Mastering Permission Management: From Basic RBAC to Advanced Role‑Inheritance Models

This article explains why strict permission management is essential for data security, walks through the evolution of access‑control models—from simple user‑permission tables to classic RBAC, RBAC1, RBAC2, role inheritance, constraints, user groups, organizational mapping, and finally presents ideal database schemas for scalable, maintainable permission systems.

Top Architect
Top Architect
Top Architect
Mastering Permission Management: From Basic RBAC to Advanced Role‑Inheritance Models

Why Permission Management Is Needed

New employees often need to request various permissions (network access, code repository write rights, monitoring dashboard logins, data‑query privileges, etc.). Missing permissions cause delays and can expose sensitive data such as merchant information, fee configurations, and personal details. Strict permission control limits data exposure to only the roles that require it, reducing the risk of accidental or malicious misuse.

Permission Model Overview

Permission Design

Permissions are categorized by business type (e.g., data‑view, data‑modify) and mapped to system elements such as page permissions, menu permissions, and button permissions. Menus are hierarchical (level‑1, level‑2, level‑3). A tree‑shaped permission structure makes it easy to see required permissions when applying.

Permission tree example
Permission tree example

Why Roles Are Needed

When the number of users grows, assigning permissions one‑by‑one becomes inefficient. Introducing a role as an intermediary allows many users to share the same set of permissions, reducing administrative overhead.

User‑role‑permission diagram
User‑role‑permission diagram

Evolution of Permission Models

RBAC Model

The classic role‑based access control (RBAC) links users to roles and roles to permissions. Both relationships are many‑to‑many, enabling flexible assignment.

RBAC model
RBAC model

Role‑Inheritance RBAC (RBAC1)

Roles can inherit permissions from lower‑level roles. For example, a finance director inherits all permissions of a finance manager, who inherits those of a cashier. This hierarchy reduces duplication.

Role inheritance diagram
Role inheritance diagram

Constrained RBAC (RBAC2)

Additional constraints improve security, such as mutually exclusive roles, cardinality limits (e.g., only one super‑admin), and prerequisite roles (a senior role requires the junior role). These constraints are stored in separate tables.

Role mutual exclusion
Role mutual exclusion

User Grouping and Organization

User Groups

When many users share the same role (e.g., a 500‑person customer‑service team), a user group can be created and the role assigned to the group, automatically granting the role to all members.

User group assignment
User group assignment

Organization Mapping

Mapping roles to organizational units enables automatic permission assignment when a user joins or moves between departments. Data visibility can also be limited to the user's organization.

Organization‑role mapping
Organization‑role mapping

Position Mapping

Positions (e.g., finance director, manager) can be linked to roles. Since a person holds a single position, the user‑position relationship is one‑to‑one, while position‑role remains many‑to‑many.

Position‑role diagram
Position‑role diagram

Permission System Table Design

Standard RBAC Tables

Four core tables are required: users, roles, permissions, plus two junction tables user_role and role_permission. The ER diagram shows the many‑to‑many relationships.

Standard RBAC ER diagram
Standard RBAC ER diagram

Ideal RBAC Tables

When data volume and business complexity increase, the model expands to include role inheritance, constraints, user groups, organizations, and positions. The resulting ER diagram supports all required relationships.

Ideal RBAC ER diagram
Ideal RBAC ER diagram

Conclusion

Permission management is a cornerstone of data security. Small teams (< 100 people) may use a simple user‑permission table, but as the organization grows, adopting RBAC, role inheritance, constraints, user groups, and organizational mapping becomes essential. The optimal model balances company size, business complexity, and operational needs.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

access controlpermission managementRBACdatabase schemaBackend SecurityRole Inheritance
Top Architect
Written by

Top Architect

Top Architect focuses on sharing practical architecture knowledge, covering enterprise, system, website, large‑scale distributed, and high‑availability architectures, plus architecture adjustments using internet technologies. We welcome idea‑driven, sharing‑oriented architects to exchange and learn together.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.