08-08-2019 11:57 PM
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
08-09-2019 12:29 AM
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>
08-09-2019 12:58 AM
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
08-09-2019 01:22 AM
Another approach is to develop your own evaluator.
Take a look at this blog post: Soft29 blog: Alfresco Extension Module evaluators
08-09-2019 04:40 AM
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.
Explore our Alfresco products with the links below. Use labels to filter content by product module.