Search the FirstSpirit Knowledge Base
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.
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.
Hello,
you can use StoreElement.getWorkflowpermissions to get an instance of WorkflowPermissions.
Hope that helps.
Best regards,
Tim
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.
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.