cancel
Showing results for 
Search instead for 
Did you mean: 

How can i remove the download button on the documents for someones users?

kferman
Champ in-the-making
Champ in-the-making

I want to put permissions for someones users.

Can i remove the download button for someones users??

Thanks for the help!!!!!

2 REPLIES 2

kalpesh_c2
Star Collaborator
Star Collaborator

Hi Kevin

To remove download button from specific type of user, first you need to add following code in share-config-custom.xml to remove download action for all users except Site Manager (by providing false, it will be removed for all users)

 

<config evaluator="string-compare" condition="DocLibActions">
      <actions>
      <!-- Download document -->
         <action id="document-download" type="link" label="actions.document.download">
         <param name="href">{downloadUrl}</param>
         <evaluator>evaluator.doclib.action.downloadBrowser</evaluator>
         <evaluator negate="false">evaluator.doclib.action.isSiteCollaborator</evaluator> <!-- Only Site Manager can download it -->
      </action>

</actions>
</config>

 

And also, you will need to override node-header.get.js found in <<ALFRESCO_HOME>>\tomcat\webapps\share\WEB-INF\classes\alfresco\site-webscripts\org\alfresco\components\node-details. You can put model.showDownload = "false" for a specific user condition you want to remove this action.

 

To get specific person object, use this : getPerson | Alfresco Documentation 

To get permission for specific file, use this : getPermissions | Alfresco Documentation 

 

Let me know if you still face any issue.

 

Thanks,

Kalpesh

ContCentric

gildo
Champ in-the-making
Champ in-the-making

I have put model.showdownload=false but I have no changes