Defines a ladder of per-site roles where higher roles include lower ones, plus platform roles and add-on roles. The defineRoles helpers work without installing a plugin, and rolesPlugin adds per-site role names to the tenants collection. Access helpers return Payload Where constraints and follow the multi-tenant plugin's tenants roles layout. Requires Payload 3.80 or later.
Roles for Payload: per-site role ladders (Member, Author, Curator, Administrator) for multi-tenant sites, plus add-on and platform roles, per-site role names and access helpers.
Installation
npm i @extantape/payload-plugin-roles0
Stars
0
Forks
0
Open Issues
1 weeks ago
Last Updated
128
Weekly Downloads
v0.1.1
npm Version
15.2 KB
Unpacked Size
0
Dependencies
00 since Nov 1
| Date | Stars |
|---|---|
| Dec 6, 2026 | 0 |
| Dec 5, 2026 | 0 |
| Dec 4, 2026 | 0 |
| Dec 3, 2026 | 0 |
| Dec 2, 2026 | 0 |
| Dec 1, 2026 | 0 |
| Nov 30, 2026 | 0 |
| Nov 29, 2026 | 0 |
| Nov 28, 2026 | 0 |
| Nov 27, 2026 | 0 |
| Nov 26, 2026 | 0 |
| Nov 25, 2026 | 0 |
| Nov 24, 2026 | 0 |
| Nov 23, 2026 | 0 |
| Nov 22, 2026 | 0 |
| Nov 21, 2026 | 0 |
| Nov 20, 2026 | 0 |
| Nov 19, 2026 | 0 |
| Nov 18, 2026 | 0 |
| Nov 17, 2026 | 0 |
| Nov 16, 2026 | 0 |
| Nov 15, 2026 | 0 |
| Nov 14, 2026 | 0 |
| Nov 13, 2026 | 0 |
| Nov 12, 2026 | 0 |
| Nov 11, 2026 | 0 |
| Nov 10, 2026 | 0 |
| Nov 9, 2026 | 0 |
| Nov 8, 2026 | 0 |
| Nov 7, 2026 | 0 |
| Nov 6, 2026 | 0 |
| Nov 5, 2026 | 0 |
| Nov 4, 2026 | 0 |
| Nov 3, 2026 | 0 |
| Nov 2, 2026 | 0 |
| Nov 1, 2026 | 0 |
139+139 since Nov 3
| Date | Weekly downloads |
|---|---|
| Dec 6, 2026 | 139 |
| Dec 5, 2026 | 183 |
| Dec 4, 2026 | 351 |
| Dec 3, 2026 | 383 |
| Dec 2, 2026 | 407 |
| Dec 1, 2026 | 430 |
| Nov 30, 2026 | 466 |
| Nov 29, 2026 | 549 |
| Nov 28, 2026 | 526 |
| Nov 27, 2026 | 360 |
| Nov 26, 2026 | 335 |
| Nov 25, 2026 | 312 |
| Nov 24, 2026 | 279 |
| Nov 23, 2026 | 241 |
| Nov 22, 2026 | 346 |
| Nov 21, 2026 | 316 |
| Nov 20, 2026 | 305 |
| Nov 19, 2026 | 273 |
| Nov 18, 2026 | 253 |
| Nov 17, 2026 | 227 |
| Nov 16, 2026 | 215 |
| Nov 15, 2026 | 0 |
| Nov 14, 2026 | 309 |
| Nov 13, 2026 | 290 |
| Nov 12, 2026 | 269 |
| Nov 11, 2026 | 364 |
| Nov 10, 2026 | 305 |
| Nov 9, 2026 | 292 |
| Nov 8, 2026 | 258 |
| Nov 7, 2026 | 232 |
| Nov 6, 2026 | 218 |
| Nov 5, 2026 | 165 |
| Nov 4, 2026 | 0 |
| Nov 3, 2026 | 0 |
Each point is npm's rolling 7-day download count.
Health Score
Composite score based on GitHub activity, stars, npm downloads, publish recency, dependency count, and package size.
Badge for your README
[](https://payloaddirectory.dev/plugins/1443439350-root)<a href="https://payloaddirectory.dev/plugins/1443439350-root"><img src="https://payloaddirectory.dev/badge/1443439350-root.svg" alt="Payload Directory"></a>README
Per-site role ladders for multi-tenant Payload sites.
Most sites need a handful of roles per site, where a higher role can do everything a lower one can. Permission matrices are overkill for that. This plugin gives you:
atLeast('author') means Author, Curator or Administrator.Where constraints (tenant in [...]), built for
@payloadcms/plugin-multi-tenant's tenants[].roles layout.A role on one site never grants anything on another.
On its own: defineRoles gives you the helpers with no plugin installed at all. rolesPlugin only adds per-site role names to your tenants collection and keeps the role system on config.custom.roles. Field names default to the multi-tenant plugin's layout, and fields changes them.
Needs: Payload ^3.80.0 as a peer dependency. No other EXTANT APE plugin is required.
Works with:
@payloadcms/plugin-multi-tenant): its tenants[].roles layout is the default, and roles.options() fills its role select.No other plugin reads config.custom.roles yet.
Color Theory: none needed. It has no screens of its own, and its collections use Payload's standard admin, which takes Color Theory's admin colors when its applyToAdmin option is on.
Family: It's part of the Identity family (a working draft): plugins designed to sit together for accounts and access.
npm install @extantape/payload-plugin-roles
import { defineRoles, rolesPlugin } from '@extantape/payload-plugin-roles'
export const roles = defineRoles({
ladder: [
{ value: 'member', label: 'Member' },
{ value: 'author', label: 'Author' },
{ value: 'curator', label: 'Curator' },
{ value: 'admin', label: 'Administrator' },
],
addOns: [{ value: 'lab', label: 'Lab partner' }],
platform: [{ value: 'maintainer', label: 'Maintainer' }],
})
export default buildConfig({
plugins: [
multiTenantPlugin({
tenantsArrayField: { rowFields: [{ name: 'roles', type: 'select', hasMany: true, options: roles.options() }] },
userHasAccessToAllTenants: (user) => roles.isPlatform(user, 'maintainer'),
}),
rolesPlugin(roles), // adds "Role names on this site" to the tenants collection
],
})
| Helper | |
|---|---|
roles.atLeast('curator') | ['curator', 'admin'] |
roles.sites(user, 'author') | Site IDs where the user is Author or higher |
roles.has(user, site, 'curator', { platformRole: 'maintainer' }) | Curator or higher there (maintainers pass) |
roles.highest(user, site) | The user's top ladder role on a site |
roles.isPlatform(user, 'maintainer') | Platform role check |
roles.access.atLeast('curator', { platformRole: 'maintainer' }) | A Payload Access: true for maintainers, else { tenant: { in: [...] } } |
roles.label(role, site.roleLabels) / roles.options(aliases) | Names and select options, with per-site names |
Field names default to the multi-tenant plugin's (tenants, tenant, roles) and platformRoles;
change them with fields.
MIT
payload plugin sharing
Share records with users and organizations through groups with Owner, Manager and Viewer levels
76425/wk0v3
multi tenant
Manage multiple tenants and tenant-scoped content from a single Payload admin panel
100165.4k/wk46.1kv3 v4
rbac
Role and capability engine with inheritance, wildcards and access guards for collections and fields
67737/wk0v3
abac
Attribute-based access control for Payload that compiles user attributes into where clauses
488/wk183v3
payload gatekeeper
Role-based access control for Payload v3 with wildcard permissions, auto role assignment and a managed Roles collection
39199/wk25v3
payload access plugin
Editable roles and an access matrix for per-collection, global and field permissions in the Payload admin
350v3