Hello,
I have read posts about how to disable download actions for a consumer or at all. But, I need to disable Download action on a folder.
Any suggestions?
Solved! Go to Solution.
This can be done share document library XML file. It has an entry for folder and document actions. You can remove or add specific evaluator for folder action.
Hi , Sakshi Kochhar
Add the following entry in Alfresco_Home/tomcat/shared/classes/alfresco/web-extension/share-config-custom.xml file.
< !-- Document Library Actions config section -- >
< config evaluator="string-compare" condition="DocLibActions" >
< !--
Action definitions
-- >
< actions >
< !-- Download document -- >
< action id="document-download" type="link" label="actions.document.download" >
< param name="href" >{downloadUrl}</ param >
< !--
Evaluator to Disable Download action when document is locked by a user
-- >
< evaluator negate="true" >"DOWNLOAD_CUSTOM_EVALUATOR"</ evaluator >
</ action >
</ actions >
</ config >
refer this documentation Creating a custom evaluator | Alfresco Documentation to create custom evaluator .
Wouldn't this disable Download Action on all of the folders.. I want to disable Download on a particular folder.
Hi ashwin.mor _
I want to disable Download on a particular folder such that no document on that folder is allowed to be downloaded. Could you elaborate on your answer.
Hi Sakshi,
Evaluators can come in handy for your use case. You need a way to identify folders for which you want to disable the action.
You can do that by using folder names as well, but I would suggest go via a aspect route. Add an aspect to the folder you want to disable the action and have a check in the evaluator.
Hope this is helpful
You can create aspect as below
Creating new custom types and aspects | Alfresco Documentation
Apply this aspect to the folders you want to restrict download action.
Use predefined evaluator to check aspect.
Hi ashwin.mor _
Thank you for the reply. I created a custom aspect type by:
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.