Posts

Showing posts with the label Roles

Moving Roles From Traditional XP To XM Cloud Using Sitecore Serialization

Hello everyone! In this blog post, we'll explore an essential concept in Sitecore — Sitecore Roles — which remains relevant across all platforms. Recently, I was working on a migration project where we needed to move Sitecore roles from a traditional XP solution to XM Cloud. Naturally, the first solution that came to mind was using Sitecore Serialization, as it's the go-to method for item migration. However, I quickly discovered that this approach doesn’t work as expected — roles cannot be serialized as IAR files. So, what now? After diving into the Sitecore documentation, I found the right approach — and I’m sharing it with you in this blog. Keep reading to find out how to successfully migrate roles to XM Cloud! The solution is that we need to module.json file which defined your roles only. The change will be that this should be deploy to your XM cloud instance as part of post deploy action mentioned in xmcloud.build.json file Step 1: Create a Foundation.Roles.module.jso...

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...