Skip to main content

Roles Model

Overview

The roles table defines access control roles within an application or organization. Each role can be assigned to users and is associated with specific permissions, bundles, or organizational contexts. This table is a cornerstone of the system's RBAC (Role-Based Access Control) framework.

Fields

FieldTypeDescriptionRequired
idstringA unique identifier for the role.
namestringThe name assigned to the role.
bundle_idanyRefers to a bundle that this role is part of. Could be a group of features, permissions, or modules.
overrideanyMay contain JSON or logic/rules that override default permissions or inheritance behavior.
ref_idanyA reference identifier for tracking purposes. Possibly used for cloning or versioning.
license_roleanyDefines the role's licensing permissions(siteAdmin/Admin/Editor/Viewer/Guest). Helps enforce licensing tiers or restrictions
application_idstringThe identifier of the application associated with the role. Useful in multi-app environments.
descriptionstringA brief description of the role. Useful for admin UIs.
applicationitem_idstringRefers to a specific component/module/feature of the application tied to this role.
predefined_bundle_idanyReferences a system-defined or default role bundle, useful for provisioning out-of-the-box roles.
statusbooleanIndicates whether the role is active (1) or inactive (0). Could be used to soft-disable roles.
permissionsanyStores the permissions assigned to the role.
created_atdateThe date and time when the role was created.
modified_atdateThe date and time when the role was last modified. Useful for audit trails and versioning.
isSystemGeneratedbooleanFlag to indicate if the role was created by the system (1) vs manually (0).
typeanySpecifies the type or category of the role.

Relationships

  • Hasone Unknown
  • Belongsto Unknown
  • Hasmany Unknown

Sample JSON

{
"id": "example_value",
"name": "example_value",
"bundle_id": "example_value",
"override": "example_value",
"ref_id": "example_value",
"license_role": "example_value",
"application_id": "example_value",
"description": "example_value",
"applicationitem_id": "example_value",
"predefined_bundle_id": "example_value",
"status": "example_value",
"permissions": "example_value",
"created_at": "example_value",
"modified_at": "example_value",
"isSystemGenerated": "example_value",
"type": "example_value"
}