I need to configure Role-based access for the Placeholder settings
section, how to achieve this?
Any suggestion would be helpful.
Thanks @Marek, your suggestion got worked out.
Here is the custom logic to restrict the access to specific role:
public class DeviceEditorForm : Sitecore.Shell.Applications.Layouts.DeviceEditor.DeviceEditorForm
{
protected override void OnLoad(EventArgs e)
{
Assert.ArgumentNotNull(e, "e");
base.OnLoad(e);
if (!Context.ClientPage.IsEvent && Sitecore.Context.User.IsInRole(ContentAuthor))
{
Placeholders.Visible = false;
}
}
}
As far as I remember there is nothing like that out of the box
You would need to:
DeviceEditor
control (most probably it's sitecore\shell\Applications\Layouts\DeviceEditor\DeviceEditor.xml
)CodeBeside
to your custom class inheriting from the original Sitecore.Shell.Applications.Layouts.DeviceEditor.DeviceEditorForm
OnLoad
method to hide PlaceholdersTab
from the DeviceEditor.xml
.