Disable Download action on a folder

cancel
Showing results for 
Search instead for 
Did you mean: 
sakshik
Established Member

Disable Download action on a folder

Jump to solution

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?

1 Solution

Accepted Solutions
12 Replies
ashwin_mor
Member II

Re: Disable Download action on a folder

Jump 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.

kalpesh_c2
Senior Member

Re: Disable Download action on a folder

Jump to solution

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 .

sakshik
Established Member

Re: Disable Download action on a folder

Jump to solution

Wouldn't this disable Download Action on all of the folders.. I want to disable Download on a particular folder.

sakshik
Established Member

Re: Disable Download action on a folder

Jump to solution

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.

ashwin_mor
Member II

Re: Disable Download action on a folder

Jump to solution

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

sakshik
Established Member

Re: Disable Download action on a folder

Jump to solution

Hi ‌,

yes ..

and I needed information on how to create such an aspect. Could you please help with that.

ashwin_mor
Member II

Re: Disable Download action on a folder

Jump to solution

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.

Predefined evaluators | Alfresco Documentation 

sakshik
Established Member

Re: Disable Download action on a folder

Jump to solution

Hi ashwin.mor _

Thank you for the reply. I created a custom aspect type by:

Admin Tools -> Model Manager -> Create Model -> 
Prefix: dwnld
Name: DownloadAction
Inside DownloadAction ->Create Aspect
Name: download_action
Parent Aspect: None
Aspect is created.Model activated successfully. Aspect shows up in the list of available aspects: 
Now, what is the way to link this aspect to the evaluator which will disable download action?
sakshik
Established Member

Re: Disable Download action on a folder

Jump to solution

‌ could you guide me through it.