Restrict component to be added to a page for specific users | Community
Skip to main content
Level 2
June 20, 2021
Solved

Restrict component to be added to a page for specific users

  • June 20, 2021
  • 1 reply
  • 824 views

Is there a way to restrict a specific user group to be able to add a component to a page? At a template level, the component should be allowed, but only specific authors should be allowed to add the component to a page

 

 

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 arunpatidar

Hi,

There is no way to restrict a component to add to a page, you can hide a component from the list but the user will be able to copy past existing components. Though you can disable the component editing for users based on path or a component

https://aemlab.blogspot.com/2018/11/aem-restrict-component-editing-and.html

 

if you want to go with this approach just create a sling Filter to disable editing

e.g. https://github.com/arunpatidar02/aem63app-repo/blob/master/java/XFFilter.java

1 reply

arunpatidar
Community Advisor
arunpatidarCommunity AdvisorAccepted solution
Community Advisor
June 20, 2021

Hi,

There is no way to restrict a component to add to a page, you can hide a component from the list but the user will be able to copy past existing components. Though you can disable the component editing for users based on path or a component

https://aemlab.blogspot.com/2018/11/aem-restrict-component-editing-and.html

 

if you want to go with this approach just create a sling Filter to disable editing

e.g. https://github.com/arunpatidar02/aem63app-repo/blob/master/java/XFFilter.java

Arun Patidar