Open the menu

    Content Locking

    Content locking is a tool that allows the portal to inform when specific content is being edited by another user. It is available for any content service, as long as it is configured for that. The news service, starting from version 5.7, comes with content locking enabled.

    There are three states that content can be in: unlocked, automatically locked, and explicitly locked. The locking states in the portal's standard services are defined below.

    Unlocked: is the state that indicates that no other user is editing the content in question.

    Automatically Locked: is the state that indicates that the user is editing content, but they did not bother to acquire the lock for themselves. Once the user saves the content or cancels their editing, the content should be automatically released, that is, without user intervention.

    Explicitly Locked: is the state that indicates that a user has explicitly stated that they wish to edit content. Upon saving or canceling, the content's state should remain the same (i.e., explicitly locked) until it is explicitly released.

    When trying to edit content that is already locked (explicitly or not) by another user, the portal will inform its current state and allow the content to be viewed only. If the user changes and tries to save the content, a pop-up informing that the action is not permitted will appear, and again the locked content screen will be displayed. The option to steal the lock will also be available, i.e., unlocking the content from the person who currently owns it and making an explicit lock on the content for themselves.

    lumis.services.general_features.content_blocking_001

    As part of the tool, unlocking content locked by other people is also possible. This feature was added to the product for any unforeseen incidents where the person who started editing content could not release it.

    The services that have the content lock functionality enabled will have an icon next to the content checkbox in their administrative list indicating the content's state.

    lumis.services.general_features.content_blocking_002

    By clicking on the icon, the state will change according to the following rule:

    Initial State Final State
    Automatically Locked lumis.services.general_features.content_blocking_003 Unlocked
    Explicitly Locked lumis.services.general_features.content_blocking_004

    Unlocked

    Unlocked lumis.services.general_features.content_blocking_005 Explicitly Locked

    The locking state of a content can also be changed by selecting the content and clicking the “(Un)Lock” button, which will execute the same state flow presented earlier. With this button, it is also possible to change the state of multiple contents simultaneously. To perform this action, however, all contents must be in the same state: locked or unlocked. The default behavior for unlocking does not distinguish whether the lock is explicit or automatic. If contents with different states are selected while trying to execute bulk unlock (or lock) action, a message will be displayed informing of the disparity between the states and no action will be taken until the issue is resolved.

    Content locking is tied to the lock and releaseLock methods in the Content API. For more details on how to use it in customized services, see the API documentation.