Disable Document Actions based on Role
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2013 09:00 AM
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>
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>
Labels:
- Labels:
-
Archive
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2013 11:56 AM
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>
<!– 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>