Is there any option to restrict non-admin Sitecore users from using the scripts option, that appears on right-clicking of tenant or site node (Using sitecore 9.3)? Refer to the below image.

The requirement is user should not be able to delete a tenant, clone a site, or delete a site. the Scripts option on right clicking of a sxa site

Thanks in advance


1 Answer 1


This is possible by adding Rule on these individual scripts. For e.g. you can go to the below script and in its Rules section, you can add a rule as in snapshot. This will show the script only to admin users.

enter image description here

If you wish, you can hide the entire Scripts item in the context menu so that none of these script items are visible to content authors by going to /sitecore/content/Applications/Content Editor/Context Menues/Default/Context PowerShell Scripts and updating it security field by denying Read access to sitecore Content Author roles. This shall hide the Scripts item itself in the context menu.

There is another different approach which will hide these options in the context menu and disable any PowerShell execution altogether for content authors. This is described in - https://ghanendras.blogspot.com/2022/11/hide-context-menu-items-in-sitecore.html Please be careful if you plan to implement this as any custom implementation dependent on PowerShell script execution will get impacted by this change.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.