Avoid concurrent edits on the same record in Strapi. Notify users when a record is being edited by another user, with an optional takeover feature.
- Let users know when a record is being edited by another user
- Prevent concurrent edits on the same record
- Takeover an entry being edited by another user (optional)
This plugin is compatible with Strapi v5.x.x and Strapi v4.x.x.
This is the primary and recommended version of Strapi. If using Strapi V5, use 2.x.x versions of this plugin. The latest plugin version has been tested with Strapi v5.34.0.
If you are using Strapi V4, please use the 1.x.x versions of this plugin. Note that Strapi V4 has reached its end of life and is no longer actively maintained.
We will continue providing critical bug fixes through community contributions, but new features and improvements will be focused on Strapi V5.
# NPM
npm i @notum-cz/strapi-plugin-record-locking
# Yarn
yarn add @notum-cz/strapi-plugin-record-locking
// config/plugins.ts
export default () => ({
// -- your other plugins configs --
'record-locking': {
enabled: true,
},
});If you are using websockets for real-time communication, you will need to update Strapi's security middleware. Update your config/middlewares.[js|ts]:
export default [
'strapi::logger',
'strapi::errors',
// Replace `strapi::security` entry with the following configuration:
// ---- security middleware start ----
{
name: 'strapi::security',
config: {
contentSecurityPolicy: {
useDefaults: true,
directives: {
'connect-src': ["'self'", 'https:', 'ws:', 'wss:', 'http:'], // update with your preferred transport
'img-src': ["'self'", 'data:', 'blob:'],
'media-src': ["'self'", 'data:', 'blob:'],
upgradeInsecureRequests: null,
},
},
},
},
// ---- security middleware end ----
'strapi::cors',
'strapi::poweredBy',
'strapi::query',
'strapi::body',
'strapi::session',
'strapi::favicon',
'strapi::public',
];While optional, it is highly recommended to implement this step to prevent Socket.io from falling back to the HTTP protocol and generating the following error in the web console.
Refused to connect to <protocol>://<url> because it does not appear in the connect-src directive of the Content Security Policy
yarn build
yarn startThis plugin has an optional config attribute. Below are the available configuration options:
Array of transport methods for real-time communication. Defaults to ['polling', 'websocket', 'webtransport'] (see transports.ts).
Example:
export default () => ({
// -- your other plugins configs --
'record-locking': {
enabled: true,
config: {
transports: ['websocket'],
},
},
});Boolean to show or hide the takeover button in the UI. Defaults to false.
If enabled, the notification dialog will include a "Takeover" button, allowing users to forcibly take over the record being edited by another user.

Clicking the button will change the lock ownership. The user who was previously editing the record will be notified that they have lost the lock.

Example:
export default () => ({
// -- your other plugins configs --
'record-locking': {
enabled: true,
config: {
showTakeoverButton: true,
},
},
});This plugin allows you to specify which content types should have record locking enabled or disabled using include and exclude options. All content types have record locking enabled by default.
include: An array of content type UIDs to enable record locking for. If specified, only these content types will have record locking enabled.exclude: An array of content type UIDs to disable record locking for. If specified, these content types will not have record locking enabled.
Important
These options are mutually exclusive. You can only use one of them at a time. If you specify both, the include option will take precedence and the exclude option will be ignored.
Example:
export default () => ({
// -- your other plugins configs --
'record-locking': {
enabled: true,
config: {
include: ['api::article.article', 'api::blog.blog'], // only these content types will have record locking enabled
// exclude: ['plugin::users-permissions.user'] // this option will be ignored if `include` is specified
},
},
});We're currently revising the roadmap for this plugin. Stay tuned for updates!
This plugin is maintained by Notum Technologies, a Czech-based Strapi Enterprise Partner.
We're a software agency specializing in custom solutions based on Strapi. We're passionate about sharing our expertise with the open-source community.
This plugin is overseen by Ondřej Jánošík and it has been originally developed by Martin Čapek.
This plugin has been brought to you thanks to the following contributors:
✔️ We offer valuable assistance in developing custom STRAPI, web, and mobile apps to fulfill your requirements and goals..
✔️ With a track record of 100+ projects, our open communication and exceptional project management skills provide us with the necessary tools to get your project across the finish line.
To initiate a discussion about your Strapi project, feel free to reach out to us via email at sales@notum.cz. We're here to assist you!
Contributions are always welcome! Please follow these steps to contribute:
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
