Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session
SOLVED

Need to remove access for enabling a template for a group

Avatar

Level 5

Need to disable the access to enable button for enabling a template.

 

Note: The user should have all other permissions except enabling the template. 

 

Please provide your inputs here.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

you need to deny permission only for below 2 nodes

/libs/wcm/core/content/sites/templates/jcr:content/actions/selection/enabletemplate

/libs/wcm/core/content/sites/templates/jcr:content/actions/selection/disabletemplate

 



Arun Patidar

View solution in original post

7 Replies

Avatar

Community Advisor

Hi @sravs ,

 

Enable/Disable options for editable templates are complement of authoring options for each of them. If certain menu items and selection actions must only show up for members of designated groups.

Screen Shot 2022-06-10 at 11.25.48 AM.png

Setting RMCDR permissions via /useradmin doesn’t get the whole job done. You need to restrict Enable/Disable to an group without causing the action to disappear for specific members. 

granite:rendercondition

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.

How can we achieve it? Please visit this article for more info: https://www.bounteous.com/insights/2020/06/10/control-aem-action-menus-render-conditions/

 

Hope that helps!

Regards,

Santosh

Avatar

Community Advisor

As @SantoshSai suggested you can go with rendercondition or

simply deny read permission to the enable and disable nodes in crxde using AC Tool or manually.



Arun Patidar

Avatar

Level 5

Thanks for your reply @arunpatidar ,

 

I have tried with ACL permissions. But it is not allowing me to edit the template, Can you please provide me the path to which I need to remove the permission.

 

Regards,

Sravani

Avatar

Correct answer by
Community Advisor

you need to deny permission only for below 2 nodes

/libs/wcm/core/content/sites/templates/jcr:content/actions/selection/enabletemplate

/libs/wcm/core/content/sites/templates/jcr:content/actions/selection/disabletemplate

 



Arun Patidar

Avatar

Level 5

@arunpatidar,

The above solution is only working for the edit bar menu, but the enable option is still showing up on the template card. How can I restrict that option on the template card.

 

sravs_0-1655704721927.png

 

Avatar

Community Advisor

Hi,

you can hide quick actions button using CSS.

 

e.g. 

.foundation-layout-panel-content .coral3-Button.coral3-Button--secondary.coral3-QuickActions-button[handle="moreButton"]{
display:none;
}

 

Note: Make sure you use a category which is loaded only in this page other wise inject a javascript to add a selector based on template landing page.



Arun Patidar