Expand my Community achievements bar.

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.

Avatar

Level 1

shahidwaris_0-1724921663056.png

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?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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-cond... 

 

Hope this helps



Esteban Bustamante

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

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-cond... 

 

Hope this helps



Esteban Bustamante

Avatar

Administrator

@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