RBAC

Role-based access control for user collections, with reusable access rules and query filters

Community 143 33/wk MIT v1.0.3

Installation

pnpm add payload-rbac

About

RBAC adds a role system to the user collections of a Payload project, so each account can be given one or more roles such as reader, maintainer or admin. It also ships a set of ready-made access rules for common cases: open access, open access to published documents only, access for any signed-in user, access limited to a given role, access that depends on a server environment value, and a block-everything rule. Each rule can take a query filter, so a role sees only the documents it is allowed to see. Rules can be combined so that access is granted when any one of them passes, or only when all of them pass. The plugin is aimed at teams that need straightforward permissions without writing custom access functions for every collection.

Package info

Package name
payload-rbac
Latest version
1.0.3
Unpacked size
39 kB
License
MIT
Weekly downloads
33
Last publish
Apr 18, 2023

More from teunmooij

View profile

Generates an OpenAPI 3 document and Swagger UI for every endpoint in a Payload config

Command-line generator that writes an OpenAPI 3 document

Generates OpenAPI 3.0 documents for the REST endpoints of a Payload project

Type-safe filters, field selection and reusable queries

Similar plugins

More in Auth

Birth month and year check at sign-up that flags minors by country and region

Lets one Payload admin panel manage content for many separate tenants

Linked accounts and role hats, with a second factor before switching to a sensitive role

Sells digital products with signed download links that expire and stop on refund

Adds passkey sign-in and passkey management to the Payload login and account screens

Lets AI assistants read and edit Payload content over MCP with scoped API keys