Kentico CMS 7.0 Developer's Guide

Object locking

Object locking

Previous topic Next topic Mail us feedback on this topic!  

Object locking

Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic!  

Object locking prevents developers from simultaneously overwriting each other's code modifications of objects. When the feature is enabled, only one developer (or more developers signed in under the same user name) is able to modify a certain object at a time.

 

Enabling object locking

 

The object locking feature is disabled by default. You can turn it on by checking the Use check-in/check-out for objects option in the following location:

 

Site Manager -> Settings -> Versioning & Synchronization -> Object versioning

 

When this option is enabled, then the CheckOut Check out button (in some cases also the View Preview button) is situated next to the Save Save button. After you click the CheckOut Check out button, this button disappears and the UndoCheckoutNew Undo checkout and CheckIn Check in buttons appear instead.

 

devguide_clip2216

 

devguide_clip2217

 

When you disable this option, then only the Save Save button is present (in some cases also the View Preview button).

 

devguide_clip2218

 

How object locking works

 

Common interface for all objects that support this function:

 

Save Save - saves changes made to the object

CheckOut Check out - locks an object, so that other users can not modify it at the same time.

UndoCheckoutNew Undo checkout -  if versioning is ON: cancels the checkout and discards all changes made to the object (even the changes confirmed by the Save Save button) and also unlocks the object for other users.

­if versioning is OFF: discards changes made to the object since the last Save Save and unlocks the object for other users.

CheckIn Check in - saves changes and unlocks the object for other users

 

If you want to edit an object, for example a CSS stylesheet (see the list of supported object types), you have to first click the CheckOut Check out button situated above the code editing area. Until you click this button, the system will not allow you to make any modifications to the object.

 

When your object is checked out, you can modify it knowing, that you are the only one with this privilege. During the editing process you can save your work by clicking the Save Save button. Clicking this button also updates the system with any modifications and allows other users to view your changes to the object.

 

After you finish your edits, you can click the CheckIn Check in button to confirm your changes and make the object available for other users. Or you can click the UndoCheckoutNew Undo checkout button to discard all changes made since the last checkout (even the changes confirmed by the Save Save button) and also to make the object available for other users.

 

 

InfoBox_Note

 

Global administrator can Undo checkout on any object

 

There is not time limit or other restriction applied to the length of time for which you can keep an object checked out. Keep in mind though, that a global administrator can perform Undo checkout on any checked out object in the system.

 

 

Creating new versions

 

Every time you click the Save Save or CheckIn Check in button, a new version of the object is created according to the rules specified in the Using object versioning topic and can be viewed on the objects' Versions tab.

 

Note that if you click the UndoCheckoutNew Undo checkout button, the version created by the Save Save button is discarded. The last version before the checkout is then set as the current version.

 

Typical scenarios

 

You want to edit an object:

 

1.Open the object's editing interface (for example Site Manager -> Development -> CSS stylesheets -> Edit (Edit) a Corporate Site)

­Notice, that you cannot edit the object at the moment.

2.Click CheckOut Check out

­The object is locked for other users. Only you can edit an object when it is checked out.

3.Edit the object

­You can repeatedly save your work using the Save Save button.

4.Click CheckIn Check in

­The system confirms your modifications and unlocks the object.

 

You want to create a new object:

 

1.Click New <object> (where <object> can be a CSS stylesheet, page layout, transformation, container or layout)

­The system displays the new object's dialog with only the Save Save button available.

2.Type in the object's name and all the required details

3.Edit the object's code

4.Click Save Save

­The system saves your new object. According to the setting of option Keep new object checked out in Site Manager -> Settings -> Versioning & Synchronization -> Object versioning the object stays checked out or not.

 

You need to edit an object, that is currently checked out by another user:

 

You have several options, you can:

wait until the user checks the object back in. You may have to refresh the object's page to see if the object is checked in again.

contact the user (you can use the built-in interface: CMS Desk -> My desk -> Messages).

ask global administrator to perform Undo checkout.

 

Viewing my checked-out objects

 

You can view all your currently checked out objects in one place:

 

CMS Desk -> My desk -> Checked out -> Objects

 

Each object's row provides three action buttons:

 

Edit (Edit) - opens a window with the object's editing interface

Check in (CheckIn) - checks the object in (unlocks it)

Undo checkout (UndoCheckoutNew) - discards all changes made to the object since the last checkout and unlocks the object

 

devguide_clip2215