blockadminrolessecurity
Roles & Permissions
Role list and permission matrix editor. UI-only — host app owns enforcement and persistence.
pnpm dlx shadcn@latest add @fenod/roles-permissionsDependencies
tabs, table, card, checkbox, badge, button, dialog, field, input, textarea
Usage
Pass roles, permissions, and matrix. Handle onSaveMatrix / onCreateRole / onDeleteRole.
Related
Toggle grants per role. Critical permissions are marked.
| Permission | Admin | Editor | Viewer |
|---|---|---|---|
| users | |||
View users users.view | |||
Invite userscritical users.create | |||
Change user rolescritical users.update_roles | |||
| roles | |||
Manage rolescritical roles.manage | |||
| records | |||
View records records.view | |||
Edit records records.edit | |||
| billing | |||
View billing billing.view | |||
Manage billingcritical billing.manage | |||