Security How To
This page will show you how to perform some common tasks when dealing with security in Sitecore using Revolver.
Revolver allows 2 methods for manipulating the locks of items. The first is to use the
co commands which check in or check out the item in question. The other method is to manipulate the lock data directly using
co only manipulate locks the current users owns. So if I wanted to check in every item I had checked out in the content tree I could ise:
find -r ci
But sometimes we don't want to just check in our own items. Many times we want to remove the locks altogether. For example, just before creating a release. We don't want to hand off a packgae where half the items are locked by a developer. To remove the locks:
sf __lock (
We can also lock content using the
co command. Why would we want to lock the content? If we need to freeze any chances to the content tree immediatley. This will only work if you're an administrator and there are no other administrators who will change the locks. To lock all content in the content tree, use the following:
find -r co
Set ownership of an item
Ownership in Sitecore is defined by the name of the account in the
__owner field of an item. Actually, this field is not shared, so different accounts can own different language versions (and even numbered versions) for the same item.
To set the owner we simply set the value of the
__owner field using the
Set Field command (
sf) and providing the fully qualified name of the account.
sf __owner sitecore\user