cancel
Showing results for 
Search instead for 
Did you mean: 

Disabling of download and copy to option in 5.0.d

kv1422
Champ in-the-making
Champ in-the-making
I want to diable download and copy options for consumer role. Please help me.
4 REPLIES 4

hardik1512
Star Contributor
Star Contributor
Hello,

Add the below config entry in share-config-custom.xml file. Hope this helps.

<config evaluator="string-compare" condition="DocLibActions">
   <actions>
      <action id="document-copy-to" type="javascript" label="actions.document.copy-to">
         <param name="function">onActionCopyTo</param>
         <permissions>
            <permission allow="true">Delete</permission>
         </permissions>
      </action>
      <action id="document-download" type="link" label="actions.document.download">
         <param name="href">{downloadUrl}</param>
         <permissions>
            <permission allow="true">Delete</permission>
         </permissions>
      </action>
   </actions>
</config>

kv1422
Champ in-the-making
Champ in-the-making
Hai Hardik,

Thanks for your suggestion, after modifying the share-config-custom.xml with your entries i am able to disable the download and copty to options, but i also want to remove the option of view in browser. Also in the preview option i also want to disable the download and view in browser option.

Thanks in advance.

K Vijay

Hi Hardik, I have followed Your steps and I am able to remove the copy permissions, But the problem is those steps are removing copy permissions for all the remaining roles also. Kindly help.

hardik1512
Star Contributor
Star Contributor
To remove the option of view in browser for consumer role add below action entry in  above actions entry

<action id="document-view-content" type="link" label="actions.document.view">
            <param name="href">{viewUrl}</param>
            <permissions>
               <permission allow="true">Delete</permission>
            </permissions>
         </action>