Updating task property as a user that is not initiator or assignee
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2013 09:52 AM
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
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
Labels:
- Labels:
-
Archive
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2013 03:08 AM
Override the Workflow service isTaskEditable method:
public class CustomWorkflowServiceImpl extends WorkflowServiceImpl {
@Override
public boolean isTaskEditable(WorkflowTask task, String username,
boolean refreshTask) {
public class CustomWorkflowServiceImpl extends WorkflowServiceImpl {
@Override
public boolean isTaskEditable(WorkflowTask task, String username,
boolean refreshTask) {
