Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Rbac Permissions?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/adityaaatiwari-rbac-permissions-anvil)
---
name: rbac-permissions
description: Enforce least-privilege RBAC and object-level authorization consistently on every API endpoint and background action
---
<!-- Generated by `anvil plugin build` from catalog/. Edit the catalog, not this file. -->
# RBAC permissions
Use when implementing user roles, permission scopes, admin routes, or team/workspace access control.
## Server-side enforcement
- Deny by default on all routes and mutations; check permissions explicitly against server-side session/membership state rather than hiding UI buttons alone.
- Enforce both role/action permission (`project:write`) AND resource ownership/tenant scope (`IDOR` protection) in the same centralized authorization guard or repository query.
- Avoid raw string comparisons scattered in controllers; use typed permission constants and shared policy helpers covered by unit tests.
## Role safety and auditing
- Prevent privilege escalation: callers must never assign roles higher than their own permissions or mutate role fields via mass-assignment DTOs.
- Record an immutable audit entry (actor, target, old role, new role, timestamp) on every permission, role, or ownership change.
## Verify
Write negative tests (`403` / `404`) for unauthenticated users, lower-role members, privilege escalation payloads, and cross-account object IDs on every endpoint.