Role Based Access Control

Role-based access control with a per-collection permissions matrix in the admin panel

Community 16 323/wk MIT v0.6.0

Installation

pnpm add @whatworks/payload-rbac

About

Role Based Access Control stores roles in the database and lets editors manage them in the admin panel. Each role gets a checkbox grid with Create, Read, Update and Delete permissions for every collection, plus Read and Update for globals. A full access option covers every collection, including ones added later.

Permissions are enforced across all collections and globals without writing an access function for each one. Access rules you define yourself still apply where you set them. Users can only assign roles that their own roles already cover, and only administrators can manage other administrator accounts, so nobody can lock themselves out or escalate privileges. Roles can also be predefined in code and seeded on startup.

Package info

Package name
@whatworks/payload-rbac
Latest version
0.6.0
Unpacked size
282 kB
License
MIT
Weekly downloads
323
Last publish
Aug 31, 2026

More from what-works-global

View profile

Switch the admin panel between production and development databases, and copy production down

Managed redirects with cache-backed Next.js middleware and an orderable admin list

Stores a computed path on each page so URLs resolve with one indexed lookup

Audit feed of document changes and user logins across every collection and global

Records who created and last edited each document, with names shown in the admin

Syncs Payload collections to Algolia with draft-aware indexing and admin reindexing

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