Has this happened to you?
You’re going about your day, working in Adobe Experience Manager (AEM) when a request comes in. Your teammate or client wants five custom user groups, and requires a different complement of authoring options for each of them. Certain menu items and selection actions must only show up for members of designated groups.
screenshot of the AEM menu
Setting RMCDR permissions via /useradmin doesn’t get the whole job done. You need to restrict Quick Publish to an Asset Manager group without causing the Manage Publication action to disappear for non-members. Denying Replicate hides them both. That won’t meet requirements.
screenshot of RMCDR permission Settings
On top of that, you have custom menu actions not tied to RMCDR in any way. They may only display based upon various user, file disposition, and state criteria.
How are you possibly going to be able to complete this request?
Granite Render Conditions
AEM provides a flexible way to hide or show almost any user interface (UI) element. Render conditions provide this control, and AEM comes with a huge number of them available for your use.
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.
When coding rules of this type, consider the two implementation choices:
1. Expression properties—placed directly on the granite:rendercondition node.
2. Stackable references to render condition components—placed underneath the granite:rendercondition node.