In my authorable component i want to disable the delete permission how can i achieve it. Only developer can delete the component. Author cannot delete the component. Author can only author the component. | Community
Skip to main content
New Participant
August 29, 2024
Solved

In my authorable component i want to disable the delete permission how can i achieve it. Only developer can delete the component. Author cannot delete the component. Author can only author the component.

  • August 29, 2024
  • 2 replies
  • 476 views

I want to remove delete icon based on the user group permission, i.e., there are two user groups A and B for A i want to show delete icon on component where as for B I don't want to show this icon. 

 

Is there a solution to it other than updating "cq:actions   string[]  edit " in cq:editConfig because that restricts these actions for everyone?

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

Hi, 

You can use a granite:render condition to check the user group and hide the specific button. Overlay the node that contains this option and add the render condition there.

 

Please check these resources which explain how to do it: 

https://jpsoares.medium.com/aem-granite-render-conditions-438c804b1e5a

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/custom-granite-render-condition-for-hiding-component-aem-ui-menu/td-p/603262 

 

Hope this helps

2 replies

kautuk_sahni
Employee
September 13, 2024

@shahidwaris Did you find the suggestion helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!

Kautuk Sahni
EstebanBustamante
EstebanBustamanteAccepted solution
New Participant
August 29, 2024

Hi, 

You can use a granite:render condition to check the user group and hide the specific button. Overlay the node that contains this option and add the render condition there.

 

Please check these resources which explain how to do it: 

https://jpsoares.medium.com/aem-granite-render-conditions-438c804b1e5a

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/custom-granite-render-condition-for-hiding-component-aem-ui-menu/td-p/603262 

 

Hope this helps

Esteban Bustamante