cancel
Showing results for 
Search instead for 
Did you mean: 

Disable Document Actions based on Role

rheimburger
Champ in-the-making
Champ in-the-making
Alfresco Version:  4.2d

This may be a repost, accept my apology if it is.  We are trying to disable document actions if the role is Consumer.  I found a recipe the modify the share-config-custom.xml:

http://injustfiveminutes.wordpress.com/2013/05/08/removing-view-in-browser-action-in-alfresco-4-2/

There should be a way to add an evaluator to disable any of the document actions based on role, e.g. Consumer, siteConsumer but I have not found it yet.

This is what I have tried so far but it is disabling for all users.


<!– Download document –>
<action id="document-download" type="link" label="actions.document.download">
     <param name="href">{downloadUrl}</param>
     <evaluator>evaluator.doclib.action.isSiteConsumer</evaluator>
     <evaluator>evaluator.doclib.action.disableAction</evaluator>
</action>

1 REPLY 1

rheimburger
Champ in-the-making
Champ in-the-making
I solved it.  I just added a permission and removed the disableAction so that a Consumer who does not have say Delete permission will not have that action.


      <!– Download document –>
      <action id="document-download" type="link" label="actions.document.download">
          <param name="href">{downloadUrl}</param>
        <permissions>
           <permission allow="true">Delete</permission>
        </permissions>
      </action>