Hide Start Workflow Action for Collaborator and Consumer

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
yash_patel_c2
Established Member

Hide Start Workflow Action for Collaborator and Consumer

Hi All,

I could hide Start Workflow for consumer by adding following in share-config-custom.xml

<config evaluator="string-compare" condition="DocLibActions">

   <actions>

      <action id="document-assign-workflow" type="javascript" label="actions.document.assign-workflow">
         <param name="function">onActionAssignWorkflow</param>
            <permissions>
               <permission allow="true">Write</permission>
            </permissions>
      </action>

   </actions>
</config>

Now I want to hide it for Collaborator also. How can I achieve that?

Thanks,

Yash

4 Replies

Re: Hide Start Workflow Action for Collaborator and Consumer

You need to create a Share evaluator. Probably the "isSiteManager" works for you.

<config evaluator="string-compare" condition="DocLibActions">

<actions>

<action id="document-assign-workflow" type="javascript" label="actions.document.assign-workflow">
<param name="function">onActionAssignWorkflow</param>
<permissions>
<permission allow="true">Write</permission>
</permissions>
<evaluator>evaluator.doclib.action.isSiteManager</evaluator>
</action>

</actions>
</config>
Software Engineer in Alfresco Search Team.
yash_patel_c2
Established Member

Re: Hide Start Workflow Action for Collaborator and Consumer

Hi Angel Borroy‌,

Thanks for your inputs.

I also tried with

<evaluator>evaluator.doclib.action.isSiteManager</evaluator>

It won't work for me. It will hide the button even for Admin also outside the site. 

How can I create custom evaluator to get this?

Thanks

Re: Hide Start Workflow Action for Collaborator and Consumer

Another approach is to develop your own evaluator.

Take a look at this blog post: Soft29 blog: Alfresco Extension Module evaluators 

Software Engineer in Alfresco Search Team.
douglascrp
Advanced II

Re: Hide Start Workflow Action for Collaborator and Consumer

This is how I do it.

I include the configuration section shown in the original question, without conditions, but I only apply the module using a group evaluator, including a condition for the site role I want it to be applied.