Hi,
I am a little bit confused and hope you can help me. In my workflow I have set CandidateUser and CandidateGroups for the user tasks.
In one user task the candidateUser is set to max@mycompany.com. When I query the tasks using REST, I will see the task. So far so good.
Now, when I want to complete the task, I do the following steps:
- claim the task
- complete the task
public void completeTask(String user, String taskId, Map<String, Object> variables) {
identityService.setAuthenticatedUserId(user);
if (MapUtils.isEmpty(variables)) {
taskService.complete(taskId);
} else {
taskService.complete(taskId, variables);
}
identityService.clearAuthentication();
}
public void claimTask(String username, String taskId) {
identityService.setAuthenticatedUserId(username);
taskService.claim(taskId, username);
identityService.clearAuthentication();
}
Now, when I try to claim and complete the task using another user (peter@mycompany.com), it works.
I am using the LdapIdentityProviderPlugin and set the AuthorizationCheckEnabled flag to true.
Shouldn’t the camunda engine throw an error, that peter@mycompany.com isn’t authorized to claim and complete a task where max@mycompany.com is set as the candidateUser?
If not, how can I “protect” my workflow?
Best regards,
Rainer