cancel
Showing results for 
Search instead for 
Did you mean: 

Hide Start Workflow Action for Collaborator and Consumer

yash_patel_c2
Star Contributor
Star Contributor

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 4

angelborroy
Community Manager Community Manager
Community Manager

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>
Hyland Developer Evangelist

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

Another approach is to develop your own evaluator.

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

Hyland Developer Evangelist

douglascrp
World-Class Innovator
World-Class Innovator

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.