Content locking configuration

Content locking protects editors’ work by locking pages, content items, and headless items while they are being edited. When enabled, the system ensures only one user at a time can edit a given item and prevents others from making conflicting changes.

This page covers how to enable content locking, configure the related permissions, and describes how content locking affects the API. See Content locking for details about the locking mechanism and editors’ experience.

Enable content locking

Content locking is disabled by default. To enable it:

  1. Open the Settings application.
  2. Go to ContentContent locking.
  3. Select the Enable content locking checkbox.
  4. Select Save.

When you disable content locking after it has already been in use, all currently locked items are automatically unlocked.

Enable content locking

Override content lock

When required, the administrator and designated users can override the content lock. This prevents blocking work in situations when a user forgets to unlock their item and becomes unavailable.

By default, the administrator can unlock any locked item to let other users edit. Other users can be granted the Override content lock permission to release content locks in selected applications. The permission is granted per application and workspace:

  • Website channel applications – allows unlocking pages within the channel
  • Headless channel applications – allows unlocking headless items within the channel
  • Content hub – allows unlocking content items within the workspace

See Assign permissions to roles for instructions on assigning permissions.

Content locking and API

When updating items via the API, the system does not automatically check whether items are locked. By default, items are modified via the API even when they are locked by editors. This can happen when you update drafts of pages or content items that are locked by an editor.

If you need to avoid overwriting the editor’s content, check whether the item is locked before modifying it. See the following API examples:

If an item is locked by an editor and you programmatically perform an action that automatically releases the lock, the item is automatically unlocked. Actions that automatically lock an item when performed in the admin UI do not automatically lock the item when done over the API.

Lock and unlock items via API

To learn how to programmatically lock items and prevent other users from editing, see:

Events

To track the changes in the lock status of an item, listen to respective Update language metadata events and compare the changes in the LockedBy property. See Content event classes for the list of available events.

Remarks

  • When a user’s account is disabled, the system automatically unlocks all items locked by the user.