AEM assets enable download button based on user group permissions | Community
Skip to main content
Level 2
September 3, 2021
Solved

AEM assets enable download button based on user group permissions

  • September 3, 2021
  • 2 replies
  • 1822 views

AEM as a cloud service 6.5

I'm looking at directions to disable asset download based on user groups permissions.

There are two download buttons in the assets console

- one in the top rail when you select an asset

- another as an icon on the asset card

 

I can think of overlaying the node to define custom behaviour

1) Can you please point me to the node which needs to be overlayed ?

2) How do we toggle this behaviour for different user groups. I'd like to set just one group to have download restriction and the rest of the groups can download.

 

Any sample code, references will be greatly appreciated.

Thanks in advance

2 replies

Abhishek_AnandThAccepted solution
Level 3
September 5, 2021
manpreetk908
Level 4
September 6, 2021

Hi,

You can refer to https://experienceleague.adobe.com/docs/experience-manager-65/assets/managing/download-assets-from-aem.html?lang=en and try to disable the asset download servlet.

 

If you don't want to show only the download button, you can try to add deny permissions for the download node (or preferably higher level hierarchy) as per your user group. Eg. deny for /libs/dam/gui/content/assets/jcr:content/actions/selection/download

 

Regards,

Manpreet

Level 4
April 9, 2024

Hi @manpreetk908 ,

I want to disable the download button for one folder. Show the download button if the user is an admin. Else hide the option to download.

How to achieve this in ACL?

 

Thanks,

Bhavani Bharanidharan

subsul1Author
Level 2
April 10, 2024

You'll have to use renderconditions to drive this logic.

Not possible using just ACLs.