1
votes

I was trying to do some deep dive into locking mechanisms in Sitecore 8 and found out something strange. I have created a role "CA" that has access to both Content Editor and Exp Editor. Then I created two users: user1 and user2.

Now, I created a page "gridtest" as a test page which has a grid component. I logged in as user1 into content editor and locked the grid component in the gridtest page. Then i logged in as user2 into experience editor and locked the page "gridtest". As a result, user2 was able to add/delete component from the grid which was locked by user1.

enter image description here

Also, I logged in as user1 into content editor to see if the grid component was still locked and yes, it was locked by user1. How am i getting this behavior ?

Is this sitecore's behavior that is holds page level lock superior to component lock ?

All help/suggestions appreciated.

1
What do you mean by locking the grid component? Have you locked datasource of the grid component? Or the component definition item under Layout? - Marek Musielak
First, I created the page gridtest and then created the grid component.Then, as user1 I have locked the datasource of the grid in the content editor. - Prathamesh dhanawade

1 Answers

3
votes

Sitecore does not allow you to lock a component. The only thing you can lock is an item.

What does it mean that you locked an item? It means that other users can not edit this particular item (except from the admin users).

In your scenario, you locked a datasource item of a component as User1 and you locked a page which has that component as User2. Now when you try to add/remove another component from that grid component as User2, you're not changing the datasource item, you're changing the page item. That's why User2 can do this.

User2 in this scenario will not be able to edit fields of the datasource item (cause it's locked by User1).

User1 in this scenario will not be able to change the page with the component (cause it's locked by User2).