I'am new with alfresco and i need to disable Download action for a consumer role (file and folder).
Someone help me please.
Consumer can not edit any resources so you can put that condition on that action to restrict download action.
Your file should have configuration like this.
<alfresco-config> <config evaluator="string-compare" condition="DocLibActions"> <actions> <action id="document-download" type="link" label="actions.document.download"> <param name="href">{downloadUrl}</param> <permissions> <permission allow="true">Write</permission> </permissions> </action> </actions> </config> </alfresco-config>
Other way is you can create custom evaluator where you need to check that which role current user has.
Hi,
Please refer this thread as already this discussed.
https://community.alfresco.com/thread/205594-disable-document-actions-based-on-role
Please take a look:
Anyway, you can find more information in this forum .
Rergards,
clv
Hi Mr Sanjay,
Thank you for your reply, I added the code in the "share-config-custom.xml" but nothing has changed, Knowing that i work with alfresco share 5.2
<!– 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>
Thank you for your reply, my need is to delete the download action (file or folder) for the customer role.
I'am blocked can you help me please.
what files i should modify?thanks
I think this issue has been explained in other messages. Please, take a look (sorry, thread in spanish):
How to disable consumer's download/share right in 5.2.e
Maybe, it could give you more information.
Regards,
Please, try other threads:
Hi All,
Hi @sanjaybandhniya
I have tried your code but it isnt working for me . I have inserted the code which i am using. I think it should hide download button from document but it is not hiding. Also Could you suggest me how can i disable it for contributor and coordinator but not for editor and collaborator
<action id="document-download" type="link" label="actions.document.download"> <param name="href">{downloadUrl}</param> <evaluator>evaluator.doclib.action.disableAction</evaluator> </action>