Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.
SOLVED

Hide/Show AEM dam asset menu options

Avatar

Level 1

We have a group of a creative user and we want to give permission for only check-in check-out to dam assets without showing menu option like edit, delete and other options as well. So how we can achieve this without overlaying or customization of OOB component.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi,

You can achieve this using overlay.

1. Overlay the node which you want to modify e.g. /libs/dam/gui/content/assets/jcr:content/actions/selection/create

2. modify privileges property in below node to add privilege which your creative users won't have e.g. jcr:readAccessControl

/apps/dam/gui/content/assets/jcr:content/actions/selection/create/granite:rendercondition/privilege

I think, this should work.

For more details find below

Render Condition — Granite UI 1.0 documentation

Privilege — Granite UI 1.0 documentation

JCR 2.0: 16 Access Control Management (Content Repository for Java Technology API v2.0)  



Arun Patidar

View solution in original post

5 Replies

Avatar

Correct answer by
Community Advisor

Hi,

You can achieve this using overlay.

1. Overlay the node which you want to modify e.g. /libs/dam/gui/content/assets/jcr:content/actions/selection/create

2. modify privileges property in below node to add privilege which your creative users won't have e.g. jcr:readAccessControl

/apps/dam/gui/content/assets/jcr:content/actions/selection/create/granite:rendercondition/privilege

I think, this should work.

For more details find below

Render Condition — Granite UI 1.0 documentation

Privilege — Granite UI 1.0 documentation

JCR 2.0: 16 Access Control Management (Content Repository for Java Technology API v2.0)  



Arun Patidar

Avatar

Level 2

Hi Arun @arunpatidar , By doing user is able to see move option still , which is coming from libs and for admin move option is visible which is from apps. any idea how to hide for a particular user?

Thanks in advance.

Avatar

Community Advisor

Hi,

you can hide move button similarly by just overlaying

/libs/dam/gui/content/assets/jcr:content/actions/selection/moveasset

 

to achieve same for particular user group you can create custom renderer e.g.

https://aemlab.blogspot.com/2019/07/aem-granite-custom-render-conditions.html

 



Arun Patidar

Avatar

Level 2

HI Arun @arunpatidar In may case I want to make the move button disabled irrespective of the users,

Disable move button for active/published pages, enable move button for inactive/unpublished.

This is to avoid the change of URL for any published pages by moving the pages. 

Any suggestions are welcome

I have raised a separate question in community also:

https://experienceleaguecommunities.adobe.com/t5/adobe-developer-questions/disable-the-move-button-f...

Avatar

Community Advisor

you can write the login in the custom renderer to show or hide button based on page status.



Arun Patidar