Implement Role-Based Access Control (RBAC), permissions management, and authorization policies. Use when building secure access control systems with fine-grained permissions.
3f5182cImplement comprehensive Role-Based Access Control systems with permissions management, attribute-based policies, and least privilege principles.
Minimal working example:
// rbac-system.js
class Permission {
constructor(resource, action) {
this.resource = resource;
this.action = action;
}
toString() {
return `${this.resource}:${this.action}`;
}
}
class Role {
constructor(name, description) {
this.name = name;
this.description = description;
this.permissions = new Set();
this.inherits = new Set();
}
addPermission(permission) {
this.permissions.add(permission.toString());
}
removePermission(permission) {
// ... (see reference guides for full implementation)
Detailed implementations in the references/ directory:
| Guide | Contents | |---|---| | Node.js RBAC System | Node.js RBAC System | | Python ABAC (Attribute-Based Access Control) | Python ABAC (Attribute-Based Access Control) | | Java Spring Security RBAC | Java Spring Security RBAC |
Copy a source-pinned command for your client. You run it yourself.
Destination: .claude/skills/access-control-rbac · pinned to the source commit
git clone https://github.com/aj-geddes/useful-ai-prompts.git
cd useful-ai-prompts
git checkout 3f5182cfd739fc113f4af5244a1cf342ad7f7911
mkdir -p ".claude/skills/access-control-rbac"
cp -r "skills/access-control-rbac" ".claude/skills/access-control-rbac"Review the source before running. This copies files into your project; it is not a one-click install and does not verify runtime safety.
Scanner static-checks@0.1.0 · commit 3f5182cfd739. Static checks cannot prove runtime safety – review the source and the exact diff before installing. How checks work.
No static rules matched. This is not a safety guarantee.