Add judging condition to disable Download button

cancel
Showing results for 
Search instead for 
Did you mean: 
YanFeiHu
Active Member II

Add judging condition to disable Download button

Hi Community:

    I want to disable the top right corner Download button,  and we can use code  'model.showDownload = "false"' to do it.

    But how to add a judging condition that if user who only have read permission, then disable it?

   Please refer the JS file as below, thank!

 

node-header.get.js

<import resource="classpath:/alfresco/templates/org/alfresco/import/alfresco-util.js">
var .......
if ( Here: If  users only have Read permission, then hide Download button,  how to creat the judging condition? ){
   model.showDownload = "false";
}

1 Reply
YanFeiHu
Active Member II

Re: Add judging condition to disable Download button

Hi Team;

     Could you give me some advise to limit download?

     Any help will be greatly appreciated. My code is as follows:

 

node-header.get.js

<import resource="classpath:/alfresco/templates/org/alfresco/import/alfresco-util.js">
var .......
if ( Here: If  users only have Read permission, then hide Download button,  how to creat the judging condition? ){
   model.showDownload = "false";
}