User permission access for the layout mode for AEM page | Community
Skip to main content
June 1, 2020
Solved

User permission access for the layout mode for AEM page

  • June 1, 2020
  • 2 replies
  • 2868 views

Can i disable the layout mode in AEM 6.5 for the particular content authors group who is able to edit the components of the page. if anyone have idea for disabling the layout mode..?

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

There is no configuration OOTB to show/hide different modes.

You can do it though using javascript.

1. Create a servlet to check current user group and return false if user is not part of layout group, otherwise true.

2. Create a clientlibs 'cq.authoring.dialog' with javscript, in javscript call above servlet and based on response hide layout option

 

Example :

$( document ).ready(function() { $.get("demo_servlet.json", function(data, status){ //console.log("Data: " + data + "\nStatus: " + status); if(data === 'false'){ $('#selectlayer-popover .editor-GlobalBar-layerSwitcherPopoverContent .coral3-ButtonList-item[data-layer="Layouting"]').hide(); } }); });

2 replies

Adobe Employee
June 1, 2020

You can use a custom rendering condition to overlay the standard action and impose specific conditions that must be fulfilled before it is rendered.

https://docs.adobe.com/content/help/en/experience-manager-64/developing/extending-aem/customizing-consoles-touch.html

arunpatidar
Community Advisor
arunpatidarCommunity AdvisorAccepted solution
Community Advisor
June 1, 2020

There is no configuration OOTB to show/hide different modes.

You can do it though using javascript.

1. Create a servlet to check current user group and return false if user is not part of layout group, otherwise true.

2. Create a clientlibs 'cq.authoring.dialog' with javscript, in javscript call above servlet and based on response hide layout option

 

Example :

$( document ).ready(function() { $.get("demo_servlet.json", function(data, status){ //console.log("Data: " + data + "\nStatus: " + status); if(data === 'false'){ $('#selectlayer-popover .editor-GlobalBar-layerSwitcherPopoverContent .coral3-ButtonList-item[data-layer="Layouting"]').hide(); } }); });
Arun Patidar