sheadawson/silverstripe-editlock

Prevents a CMS user from editing a record that another CMS user is currently editing

Installs: 85 124

Dependents: 1

Suggesters: 0

Security: 0

Stars: 24

Watchers: 5

Forks: 10

Open Issues: 1

Type:silverstripe-module

1.0.1 2016-12-19 01:53 UTC

This package is auto-updated.

Last update: 2024-10-08 11:06:03 UTC


README

Requirements

  • SilverStripe ~3.1

Maintainers

Description

Prevents a CMS user from editing a record that another CMS user is currently editing, to avoid change conflicts/data loss.

Screenshot

Installation

Download this module into the root of your project. The module folder must be named "editlock". Run dev/build.

Composer: require "sheadawson/silverstripe-editlock": "1.0.x"

Usage

The module will take effect on any DataObject's standard CMS edit form out of the box. A locked object will display a readonly version of the edit form and a message explaining why it's locked and who is editing it. Editing will be re-enabled a maximum of 15 seconds after the original editor has navigated away from the edit form.

If you need to restrict locking to only specific data classes, you can specify these in your yml config as below.

EditLockControllerExtension:
  lockedClasses:
    - 'BlogPost'
    - 'Article'

Edit anyway override

Users with the "edit anyway" permission are given the option to override the lock and edit the record anyway, after being made aware of the risks. This permission can be applied to user groups in the Security section of the CMS.