A Veteran Programmer’s Simple RBAC Permission System Design
This article walks through a straightforward back‑office permission system, defining permissions as resource collections, presenting a five‑table database schema, and explaining how classic Role‑Based Access Control (RBAC) simplifies permission management for multiple users.
Background
Today the company needs a back‑office management system. To give newcomers practice, the design task was assigned to a programmer described as a “veteran”.
What is Permission
Permission is treated as a collection of resources in the software system, covering page navigation, operation rights, and CRUD actions on data. The article shows an example diagram illustrating pages such as menu management, role management, user management, system settings, log management, banner management, article management, and notification management, and explains that access to these pages and the visibility or clickability of buttons constitute permissions.
Database Design
The design uses five tables: User, Role, MenuPermission, UserRole (association), and RoleMenuPermission (association). The article includes a diagram of the schema.
RBAC
The table structure and PDM reveal a classic Role‑Based Access Control (RBAC) model. RBAC assigns permissions to roles, and roles to users, thereby granting permissions indirectly. When multiple users share the same permissions, assigning permissions through roles allows a single change to a role’s permissions to affect all associated users, reducing the chance of permission‑related bugs. The article notes that this design is sufficient for a typical back‑office management system and mentions that RBAC can be further refined in future posts.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Coder Trainee
Experienced in Java and Python, we share and learn together. For submissions or collaborations, DM us.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
