2

created new Sitecore custom role and assigned access rights for this role. Tested working fine. Now plan is to move this implementation to another environment. We created new Sitecore package to do this. but only role and user i can add in package.

I also needed to add access right too assigned on custom role.

thanks

3

Access rights are stored directly on the items.

You cannot move access rights assigned for a role or user to another environment using content packages without including those items inside content package.

Access rights for items is just one field there:

enter image description here

If you check raw values of that field, it's just a string value, e.g.:

au|sitecore\ServicesAPI|pe|+item:read|+item:write|ar|sitecore\Author|pe|+item:create|+item:read|+item:rename|+item:delete|+item:write|^*|+item:admin|pd|+item:create|+item:read|+item:rename|+item:delete|+item:write|^*|+item:admin|

You need to move that value to another environment. If you're limited to content packages, you need to move the item containing that field. If you have other options, you may try to copy value of that field only.

| improve this answer | |
  • thanks, and can we do this using sql query to move access rights only, will this be good practice? because there are thousands of items. – Pradeep Gupta Mar 3 at 8:39
  • I'm always scared of doing changes directly in SQL database. That's never trivial and may cause some serious issues. And you may need to restart Sitecore site for the caches to be refreshed – Marek Musielak Mar 3 at 8:43
  • got that, many thank – Pradeep Gupta Mar 3 at 8:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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