Team Development for Sitecore (TDS) supports the ability to manage your Sitecore roles within your TDS projects in Visual Studio. This ensures that important roles defined for things like workflow or other security needs can be deployed to all your environments.
Recently, I was building my packages for deployment to production and was going through the generated .update package and could not find my roles. No folders for roles, no files for roles… WHERE ARE MY ROLES?
Hedgehog support to the rescue!
I reached out to the fine folks at Hedgehog for some help and heard back the same day. Apparently, the standard Sitecore Update package format doesn’t support roles, so when Hedgehog added the support they did some sneaky things to make magic happen. The roles have actually been added into post deployment steps, and you can find the role definitions inside the file /_Dev/DeployedItems.xml.
The XML looks something like this:
<Role Name="sitecore\Keystone Multisite Manager"> <![CDATA[LS0tLXJvbGUtLS0tDQpuYW1lOiBzaXRlY29yZVxLZXlzdG9uZSBNdWx0aXNpdGUgTWFuYWdlcg0KDQo=]]> </Role>
This obfuscated CDATA content contains all the things you need to define the role in Sitecore. Pretty nifty!
Working on exporting roles now. Great tip!