Back to Playbook
Act 5: Growth & Governance

24. Access Control (RBAC)

Story

As the organization grows, Sarah carefully manages access control so employees only see and modify the information required for their responsibilities.

Using RBAC, she assigns roles and permissions across departments, payroll, attendance, reporting, and administration while ensuring sensitive company data remains protected.

Happy Path

Roles and permissions are configured successfully, and every request across the platform is validated against the user’s assigned access scope.

  • Admin creates custom roles with permission sets
  • Admin assigns roles to users
  • Permissions are enforced on every action and request
  • Access is granted or denied based on assigned permissions and scope

The Route Registry (One Catalog, One Truth)

Access control only stays honest if what people see and what they are allowed to do never drift apart. Zetta guarantees this with the Route Registry — a single catalog of every screen in the app and exactly what gates it.

Because the navigation menu, the access map, and the page-level permission checks all read from this one catalog, there is no second list to keep in sync. Add or change a screen in the registry and the menu, the gates, and the access view move together.

  • Each route entry records its real page, label, menu placement, icon, and status
  • Required permissions are picked from the catalog (not free-typed), with an ANY/ALL rule, allowed roles, minimum plan, and feature flag
  • Platform-only routes are marked so tenant users never reach operator screens
  • The menu and page guards derive their permissions from the same rules, so coverage cannot silently diverge

Failure Modes

FailureWhat the user seesWhat happens next
Duplicate role nameValidation rejects duplicate role creationUse a unique role name
Delete role with active assigned usersRole deletion blockedReassign users before deleting the role
Permissions modified for an active roleUpdated permissions apply immediatelyAffected users receive updated access automatically
User has no assigned roleAll protected access is blockedAdministrator assigns a valid role
Unauthorized resource access attempt403 access denied responseAttempt is blocked and audit logged
Access attempt outside assigned scopeRequest rejectedUser must operate within permitted scope

Edge Cases

ScenarioBehaviorWhy
Role scope configured for all departments versus selected departmentsAccess enforced exactly according to role scope configurationMaintains tenant-safe least-privilege access control
Field-level permission restrictions enabledRestricted fields become hidden or read-onlySupports fine-grained access governance