Design a Permission and Role System
Design a role-based access control system. Include users, roles, and permissions, role hierarchy with inheritance, resource-level policies, permission resolution, and access evaluation.
Suggested time: 45 minutes
Loading the workspace...
About this problem
A permission and role system (RBAC) is a core OOD problem in enterprise software because it combines hierarchical data structures (role trees), the Chain of Responsibility pattern (policy evaluation), and demanding concurrency requirements (high-frequency reads with infrequent writes). Let's define exactly what the system must do.
What your design needs to cover
Role-Based Access
Hierarchical Roles
Access Checking
Granular Permissions
Deny Overrides
Key challenges the editorial covers
Learn from other designs
Related problems
Design a Voting Booth System (medium)
Design a Banking System (medium)
Design an ATM (medium)
Design a Compiler Lexer and Parser (advanced)
Design an Entity-Component System (advanced)