This plugin is used to protect the data from users who are not the owner of the data.
released May 5, 2025
npm install strapi-plugin-data-ownership-guardA powerful Strapi plugin that helps protect your data by ensuring users can only access and modify data they own. This plugin adds an additional layer of security to your Strapi application by implementing ownership-based access control.
npm install sstrapi-plugin-data-ownership-guardnpm run buildnpm run developFor the plugin to work properly, your content types must have a user relation field that associates records with their owners. The plugin will automatically:
The plugin supports both JWT and Firebase authentication. Make sure your authentication system is properly configured before using the plugin.
IMPORTANT: You need to enable find and findOne APIs in user-permissions section under USER category to make the plugin able to work.
You need to enable APIs that you want to protect by this plugin.
note: Make sure you enable these APIs as Authenticated otehrwise you may receive unknow errors.
The plugin implements a middleware that:
The plugin will return appropriate error responses:
403 Forbidden when a user attempts to access/modify data they don't own500 Internal Server Error for any unexpected errorsWe're working on adding these exciting features in future releases:
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
Abolfazl Younesi abolfazl.younesi277@gmail.com
Share your work with the community and get it listed in the Strapi ecosystem for everyone to discover and use.
Submit
