Posts

Showing posts from July, 2024

Power Of Sitecore Module In XM Cloud

Image
In this blog, we will explore how to automate the process of creating roles with appropriate permissions when working in a multilingual and multisite environment. As soon as we think about automation, PowerShell scripts are often the first tool that comes to mind. And you’re absolutely right—we will be using PowerShell scripts, but with a twist. We'll leverage Sitecore Modules to approach this differently, integrating the module into the scaffolding definition. This way, whenever a new site is created in XM Cloud, roles and permissions will be automatically set up. So let's quickly start. Before we move forward, I recommend reading my previous two blogs on role creation and assigning proper permissions, which are explained through a specific use case. We'll be using the same use case for our purposes here. Roles Creation Assign Permission We will divide the blog into 2 section. Creating the Scripts Creating the Module Creating the Scripts in Script Library We ...

PowerShell Script For Creating Roles and Permission Part 2

Hello everyone, this is continuation of blog where we have seen how to create appropriate roles to manage content authoring more effectively. You can refer the part 1 of blog here Now our focus will be on assigning the permissions to the roles which was created on previous blog. Let's see the script that is required to update the permission. $siteLanguages = @("en-IN") $siteName = "IN" $siteType = "External" $Organization = "ABC" $region = "Asia" $rolePrefix = "$Organization $siteType $siteName" $siteAccessRole = "$rolePrefix Access" $siteAdminRole = "$rolePrefix Site Admin" $contentAdminRole = "$rolePrefix Content Admin" $contentContributorRole = "$rolePrefix Content Contributor" $contentPublisherRole = "$rolePrefix Content Publisher" $contentPreviewerRole = "$rolePrefix Content Previewer" #Content $regionPath = "/sitecore/content/$Organization...