cancel
Showing results for 
Search instead for 
Did you mean: 

Updating task property as a user that is not initiator or assignee

gravitonian
Star Collaborator
Star Collaborator
Hi,

Does anyone know if it is possible to change an Activiti Task property such as Due Date if you are not the workflow initiator or task assignee?

I am getting "org.alfresco.repo.security.permissions.AccessDeniedException: 09070185 Failed to update task with id 'activiti$7546'."

Some forum messages such as http://forums.activiti.org/content/task-model-permissions-vs-attachment-permissions says that it's an Activiti restriction.

I have bypassed security checks by overriding invoke() of the out-of-the-box WorkflowPermissionInterceptor and I am setting the task in question to editable by overriding onTaskDetailedData in task-edit-header.js and overriding onWorkflowDetailedData in workflow-form.js.

So the user, which is not initiator or assigned the task, can navigate to a document that is part of the workflow and click on the workflow link and the Workflow Details page is displayed with the task editable. Clicking Edit takes the user to the Edit task page. However, when updating due date I get the above access denied exception.

I have also setup the user as Collaborator on the bpm_package just to try that.

Martin
1 REPLY 1

gravitonian
Star Collaborator
Star Collaborator
Override the Workflow service isTaskEditable method:

public class CustomWorkflowServiceImpl extends WorkflowServiceImpl {

@Override
    public boolean isTaskEditable(WorkflowTask task, String username,
                                  boolean refreshTask) {