Disable Download action on a folder

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

Re: Disable Download action on a folder

Jump to solution

Hi Sakshi,

Look at

 

Use predefined evaluator to check aspect.

Predefined evaluators | Alfresco Documentation 

We now need to add a condition in share document library XML file to use the new aspect.

sakshik
Established Member
krutik_jayswal
Senior Member II

Re: Disable Download action on a folder

Jump to solution

First which you need to do is creating an marker aspect.Apply it to the folder on which you want to disable the download action.There are multiple ways for adding an aspect.

For disabling the download action on the children/files which are inside the folder we have 2 approach.

First one is, 

Creating new custom evaluator in which you need to check whether the parent folder has the marker aspect or not.If it has you can disable the download action by returning fals evalue in custome java evaluator.

Below link will help you in creating an custom java evaluator.

Evaluators | Alfresco Documentation 

Second one it.

Create a behavior, which will get called when you add in aspect in a folder.In this behavior write the logic that when you add aspect in folder it will also apply that aspect to all childrens.

Create one more behavior , when you upload or create a content inside that folder , it will check whether the parent folder has an aspect or not, if it has it will apply it to the new content as well.

Below links will help you in creating policies.

Implementing Custom Behaviors in Alfresco | ECMArchitect | Alfresco Developer Tutorials 

Behaviours / Policies | Alfresco Documentation 

After creating policies use hasAspct evaluator which is mentioned in below link.For creating hasAspect evaluator you do not need to do any java coding.

Predefined Evaluators | Alfresco Documentation