AnsweredAssumed Answered

Accessing another user task

Question asked by tobix10 on Sep 2, 2013
Latest reply on Nov 22, 2013 by marcus.svensson
Hello, when I try to get details of a task from account which is not an owner one I receive exception: <blockquote>org.alfresco.repo.security.permissions.AccessDeniedException: Accessing task with id='activiti$12495' is not allowed for user 'username'.</blockquote>

From admin console I gave all permissions to the associated workflow document to that user and even all permissions to the package folder, but nothing change. How to do this right?

My goal is to give read only access to all tasks where some user was chosen as Observer(there is special field on form).
I've tried to set permissions on bpm_package in org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener call after completion of task, but I got error that 'observers' is not defined(this is an aspect set to the task, this aspect is an association to cm:person). My code:
for (i=0; i < observers.size(); i++) {
     bpm_package.setPermission("Collaborator", observers.get(i).properties["cm:userName"]);
}
runas admin

How to get this aspect/association in script?

Any suggestions how to give access to tasks to users that are not initiator or owner?

Activiti engine
Alfresco 4.2d

Outcomes