Roles & Permissions
Metadata schema for defining roles and permissions in SolidX applications.
Where it lives
JSON Pointer: /roles
JSONPath: $.roles
Parent: Root of the metadata file
Overview
Roles and permissions define high-level access control in SolidX.
Permissions are discovered from backend controller methods and represent individual capabilities such as InstituteController.findMany or InstituteController.update. Roles package those capabilities into reusable access profiles that can be assigned to users.
By default, the Admin role is created with all discovered permissions.
Mental Model
Roles and permissions work as a two-layer access model.
- Permissions describe what the system can do. Think of permissions as backend-discovered capabilities.
- Roles describe who should be allowed to do it. Think of roles as the business-facing grouping of those capabilities.
- Use roles to express job function, not only technical access flags.
Example: Fee Portal Module Roles & Permissions Metadata
Roles and permissions schema example
{
..., // Other metadata
"roles": [ // Array of role metadata
{
"name": "Institute Admin",
"description": "Admin role for managing institute-related operations",
"permissions": [ // Array of permissions
"InstituteController.create",
"InstituteController.insertMany",
"InstituteController.update",
"InstituteController.partialUpdate"
"InstituteController.findOne",
"InstituteController.findMany",
"InstituteController.delete",
"InstituteController.deleteMany",
"InstituteController.recover",
"InstituteController.recoverMany",
],
}
]
}Roles & Permissions Metadata Attributes
name (string, required, unique)
Name of the role.
description (string, optional)
A brief description of the role's purpose.
permissions (array of strings, optional)
An array of permission strings associated with the role. Each permission corresponds to a specific action that can be performed within the system, typically in the format controller.method (e.g., InstituteController.update).
Permissions are discovered from controller methods in the codebase. For example, a controller method such as InstituteController.create produces the permission InstituteController.create.

