Action Evaluators in Alfresco

Alfresco provide various actions on the document and spaces which will help users to manipulate the document. It enables users to do various operations like delete, copy, move etc… on the document and space. On document details page actions can be seen on the right hand side.

Out of box various actions available on documents but each of these actions is shown based on the authorization of logged in user. Alfresco has feature called action evaluators which can be imposed on individual action which will decide particular action should be rendered or not for particular user or particular document. There are requirements where we need to hide some of the actions based on some criteria.

Alfresco have many of such action evaluators inbuilt which can be used to hide actions based on the criteria. Some of those actions created generic enough so that based on the parameter passed it will behave differently. There are various action evaluators like chainedMatchOne and chainedMatchAll available which allows chaining multiple actionevaluators to create complex criteria.All the inbuilt action evaluators can be found under


All the action evaluators listed there can be extended or reused.

For instance if we want to hide delete action for all the documents on which versionable aspect is applied.

Step 1:

Create custom-action-context.xml file with following entry

<bean id="custom.evaluator.doclib.hasversionable" class="org.alfresco.web.evaluator.HasAspectEvaluator">

      <property name="aspects">
            <value> cm:versionable </value>

Place it under


Step 2:

Use above evaluator in share-config-custom.xml  file to hide delete document action

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

 <action id="document-delete" type="javascript" label="actions.document.delete">

            <param name="function">onActionDelete</param>


               <permission allow="true">Delete</permission>


            <evaluator> custom.evaluator.doclib.hasversionable </evaluator>



Note: This is applicable to Alfresco Share User Interface only for Alfresco explorer interface you need to follow different set up steps to hide actions.

If inbuilt action evaluators do not meetup our requirement we can create custom action evaluators. We will see about it in upcoming posts.

Looking for quality Alfresco Hosting? Look no further than Arvixe Web Hosting! 

Tags: , , , , , , , | Posted under Alfresco | RSS 2.0

Author Spotlight


I love opensource technologies working with those technologies from the time I have stepped in to the Software Industry. Alfresco CMS is my area of expertise. I have worked on various complex implementations which involved integration of Alfresco with other technologies, extensively worked with JBPM workflows and Webscripts.

Leave a Reply

Your email address will not be published. Required fields are marked *