How to hide Annotate button for a particular user group | Community
Skip to main content
New Participant
October 18, 2022

How to hide Annotate button for a particular user group

  • October 18, 2022
  • 2 replies
  • 1344 views

I am trying to hide annotate button for a particular user group. I am able to hide it from all the places except the annotate button which appears when you click on the three dots on an asset. Is there a way to hide it for a specific user group?

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

New Participant
October 23, 2022

Hi @reddyishanvi 

 

This can be achieved using Render conditions.AEM provides a flexible way to hide or show almost any UI element using Render conditions. 

 

A render condition is a mechanism that decides if a component should be displayed or not. It will drill-down through sub-conditions, evaluating them recursively, and return true or false. The Granite UI Foundation provides a set of built-in render conditions. 

https://developer.adobe.com/experience-manager/reference-materials/6-5/granite-ui/api/jcr_root/libs/granite/ui/docs/server/rendercondition.html

 

https://www.bounteous.com/insights/2020/06/10/control-aem-action-menus-render-conditions

 

Hope this helps!

New Participant
October 25, 2022

Thank you @ganthira1 . The problem here is I am not able to find the path to the Annotate link which is appearing after clicking those 3 dots.

Rohan_Garg
New Participant
July 4, 2023

@reddyishanvi - Were you able to solve this issue?

Shouldn't the annotate button be it in the header options or side menu have the same source path which is /libs/dam/gui/content/assetdetails/jcr:content/actions/annotate ?

krati_garg
Employee
October 18, 2022

There is no OOTB feature or Configuration available to achieve this. However, you can consider achieving this at Front End. Capturing DOM elements through Javascript and hiding it on the basis of an ajax call to the servlet, which would resolve the logged in user group. This servlet can contain the logic what specific groups are not supposed to see this Annotate Button and return true and false accordingly.