Custom Granite render condition for hiding component/AEM UI menu option based on User Group
Hi AEM Community,
I have a use case where we want to hide "Annotate" option on AEM Assets for certain user groups.
The best way to do so should be via render conditions.
I was checking out the below blog for it -
https://www.bounteous.com/insights/2020/06/10/control-aem-action-menus-render-conditions
This blog has mentioned a component that validates against a group property is located at /libs/fd/fm/gui/components/admin/renderconditions/groups. However, in AEMaaCS there is no such path anymore.
Query 1 - Is there still a OTB render condition that decides based on group membership?
There was an alternative blog on the same -
https://jpsoares.medium.com/aem-granite-render-conditions-438c804b1e5a
Here they have created a sling model, and created a render condition on the dialog that points to the html file which invokes the sling model.
However, when trying the same I was not able to do so.
My use case is I am trying to hide the Annotate button on AEM Assets for selective user groups.
This button needs to be hidden from both primary and secondary location as well - primary being the top rail and the secondary being the ellipsis menu on each asset icon.
Query 2 - Is hiding the asset optimal way to restrict users of certain groups or should we write corresponding ACLs to do so?
In terms of ACLs how do you restrict an asset's privilege with respect to annotation?
Thanks,
Rohan Garg
