Skip to content

Instantly share code, notes, and snippets.

@AdamNaj
Created June 13, 2018 05:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AdamNaj/b19932506493a855606058c195b7f10c to your computer and use it in GitHub Desktop.
Save AdamNaj/b19932506493a855606058c195b7f10c to your computer and use it in GitHub Desktop.
Modify SXA "Clone Site" script to be able to clone sites with Security set up on them.
# Open the following item:
# /sitecore/system/Modules/PowerShell/Script Library/SXA/SXA - Multisite/Content Editor/Context Menu/Clone Site
# inside the try{ } clause wrap its content with:
New-UsingBlock(New-Object -TypeName "Sitecore.SecurityModel.SecurityDisabler"){
# all code that was inside the try clause before - goes here
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment