cancel
Showing results for 
Search instead for 
Did you mean: 

how to hide the start workflow option for perticular role ?

jetty
Champ in-the-making
Champ in-the-making
i am working with workflow's . i need to hide this start workflow for certain roles .like "if i want it hide start workflow for editor …" what i should edit
5 REPLIES 5

amitabhandari1
Champ in-the-making
Champ in-the-making
Hi jetty,

You can make use of evaluators  which will check if the current user has editor role on a document or space ,  make the action visible or hide it.
The evaluator has to be used with action "start_workflow" defined in  web-client-config-workflow-actions.xml.
You can customize this action and place the evaluator.
For the reference  you can also check  "StartWorkflowEvaluator" java file.

Thanks,

jetty
Champ in-the-making
Champ in-the-making
Hi jetty,

You can make use of evaluators  which will check if the current user has editor role on a document or space ,  make the action visible or hide it.
The evaluator has to be used with action "start_workflow" defined in  web-client-config-workflow-actions.xml.
You can customize this action and place the evaluator.
For the reference  you can also check  "StartWorkflowEvaluator" java file.

Thanks,


Hi Amita,
              can you please suggest me how to get the role details like weather this member  is an editor or an consumer etc through java code please let me know this thing .  :?:

jetty
Champ in-the-making
Champ in-the-making
Hi jetty,

You can make use of evaluators  which will check if the current user has editor role on a document or space ,  make the action visible or hide it.
The evaluator has to be used with action "start_workflow" defined in  web-client-config-workflow-actions.xml.
You can customize this action and place the evaluator.
For the reference  you can also check  "StartWorkflowEvaluator" java file.

Thanks,



Hi Amita,
              a small correction here .i have created  different workflos and i wanna hide these workflos for  a perticular role .can you please suggest me how to get the role details like weather this member  is an editor or an consumer etc through java code please let me know this thing .  :?:

amitabhandari1
Champ in-the-making
Champ in-the-making
You can make use of  methods of PermissionService.
Try using "getPermissions(NodeRef nodeRef)" method to get the permissions. Also you can check "hasPermission(NodeRef passedNodeRef, final PermissionReference permIn)"   of the permissionService.

Thanks,

jetty
Champ in-the-making
Champ in-the-making
You can make use of  methods of PermissionService.
Try using "getPermissions(NodeRef nodeRef)" method to get the permissions. Also you can check "hasPermission(NodeRef passedNodeRef, final PermissionReference permIn)"   of the permissionService.

Thanks,



Hi Amitha ,
                thank you for the information .and can i know the mail id of yous .