Simple RBAC

Enables role-based access control in Payload CMS.

Community 42 24/wk MIT v0.2.0

Installation

pnpm add @nouance/payload-simple-rbac

About

Simple RBAC is a plugin for Payload CMS that facilitates basic role-based access control. Users can define a set of roles prioritized in an array, where the roles at the end of the array have the highest priority. This structure allows for flexible permissions: for instance, an 'admin' can perform all actions of an 'editor', while restricting the editor to their assigned tasks. To use this plugin, it needs to be added to the Payload configuration under the plugins array. Users must specify roles, user slugs, and collections along with their permissions. Options include defining a default role, customizing the role field name, and specifying permissions for different collections. The plugin supports customizable permissions like 'read' access to published content only, or public access for any user. The plugin is still in beta and requires further testing. It includes basic functions for role checking and managing access to fields within collections.

Package info

Package name
@nouance/payload-simple-rbac
Latest version
0.2.0
Unpacked size
31 kB
License
MIT
Weekly downloads
24
Last publish
Apr 17, 2023

More from NouanceLabs

View profile

Similar plugins

More in Auth