Workflow permissions
Hi all,
Do you know if an instance of a workflow does use the permissions of the user who started the workflow or does it use system permissions? If the user for example, does not have permissions to change characteristics of an asset - is it possible to change this characteristics using a workflow? (assuming such custom workflow would be created).
Regards,
Darek Jasinski
dariuszjasinski
Posted 3 years ago · Edited 1 year ago·Last reply 3 years ago
3 comments
akashmittal
·3 years ago · EditedHi Dariusz,
By default, any workflow (whether on-demand or scheduled) is triggered by internal Workflow user.
But in case you want to run a workflow for a specific user, you can use Java core API and use the method runAsUserById(java.util.UUID userId, java.lang.Runnable runnable) to execute the workflow through a specific user permissions in case that’s your use case.
Please note although it’s possible but I have rarely seen people using this logic.
Regards,
Akash
harryhazelwood
·3 years ago · EditedHey Darek,
A workflow does not defer to a user’s base permissions when it is executing.
As such, a workflow can indeed do things which the user would not normally be able to do.
E.g. For your example, you could indeed have a workflow that allows the changing of a characteristic of a given asset even if you did not have permissions to change it manually.
If you did want to restrict this, you could do it by defining exactly who is able to start the workflow on the workflow definitions page.
dariuszjasinski
OP3 years ago · EditedHi Harry,
Thank you for explanation.
Darek