beanshell script to assign workflow permission
Author: rinku_chowdhury
Publication Date: 5/9/2018 10:37
Hi all,
I am writing a script which supposed to create a folder (pagestore) and along with by adding group and assign the permission (both object and workflow) accordingly. However, I did the permission for the created object but not able to manipulate the workflow permission. Somehow, not able to use setUseReleasePermission(), workflowPermission interface as it doesnt inherits storeElement interface. Here I have attached the script and the picture. would appreciate any kind of clue.
TIA.
-
Author: pavone - 5/9/2018 12:33
Hello,
you can use StoreElement.getWorkflowpermissions to get an instance of WorkflowPermissions.
Hope that helps.
Best regards,
Tim
0 -
Author: rinku_chowdhury - 5/9/2018 13:04
Hi Tim,
It does return null value if the release permission is not authorized. from my understanding, either directly have to set the workflow permission (
setWorkflowPermissions(WorkflowPermission[] permissions)) or to modify once the " use release permission" is authorized. But both ways i find it very blur.0 -
Author: rinku_chowdhury - 5/11/2018 10:56
What i did to address this issue is that I retrieved StoreElement.getWorkflowpermissions from an existing element and modified the permissions accordingly like : transitionpermission, setAllowedGroups, setUseReleasePermission etc. to set (
setWorkflowPermissions(WorkflowPermission[] permissions).into the new storeElement.0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
3 Kommentare