Roles & Permissions (RBAC)
Pyxis CMS implements an RBAC system, separating the user’s identity from their specific permissions within the system.
Role Architecture
Section titled “Role Architecture”The system relies on two key columns in the roles table:
- Name: The display name (e.g., Administrator, Editor), which is subject to localization (translations).
- Slug: A persistent technical identifier (e.g.,
admin,editor) upon which all PHP logic is based.
Benefits of this approach
Section titled “Benefits of this approach”- Code Stability: Access logic (e.g.,
$user->isAdmin()) always refers to the slug. Even if you change the role’s display name in the admin panel, the system logic remains intact. - Scalability: The structure is prepared for future implementation of a full
permissionstable and integration with the plugin system.