This plugin provides the ability to stop data loss when two users are editing the same record in STRAPI v4
✅ Have only one user editing one record at a time ✅ Clearly shows you who is the other user editing the record
npm i @notum-cz/strapi-plugin-record-locking
yarn add @notum-cz/strapi-plugin-record-locking
module.exports = ({ env }) => ({
"record-locking": {
enabled: true,
},
});
For the config/middlewares.js
file you will need to either replace 'strapi::security'
with middleware object (example below) or update your existing configuration accordingly...
- Ensure that
"ws:"
and"wss:"
are present in strapi::security config undercontentSecurityPolicy.directives.connect-src
- Rebuild strapi and test record locking features.
- There should be no
Content Security Policy
error in the console.
module.exports = [
'strapi::errors',
{
name: "strapi::security",
config: {
contentSecurityPolicy: {
useDefaults: true,
directives: {
"connect-src": ["'self'", "https:", "wss:", "http:"],
"img-src": [
"'self'",
"data:",
"blob:",
],
"media-src": ["'self'", "data:", "blob:"],
upgradeInsecureRequests: null,
},
},
},
},
'strapi::cors', ...
This is optional but recommended as Socket.io will fallback to using http protocol and throws the following error in web console...
Refused to connect to <protocol>://<url> because it does not appear in the connect-src directive of the Content Security Policy
- ✨ Option to choose specific collection types
- ✨ Add a "Takeover" button
- ✨ Possibility to choose roles prioritization (Author cannot Takover SuperAdmin)
We are using GitHub Issues to manage bugs.
If you want to help us you would be a rock ⭐.
The main star: Martin Čapek https://github.com/martincapek
Developer: Filip Janko https://github.com/fikoun
Project owner: Ondřej Janošík
🚀 Created with passion by Notum Technologies
- Official STRAPI partner and Czech based custom development agency.
- We love to share expertise with the open source community, that's why this plugin was created. 🖤
✔️ We can help you develop custom STRAPI, web and mobile apps.
✔️ With 100+ projects, open communication and great project management we have the tools to get your project across the finish line.
📅 If you want to discuss your Strapi project, text us at sales@notum.cz