Role
Role Type
Represents a role in the system's role-based access control (RBAC) model. Roles define sets of permissions through access policies and can be assigned to users and groups.
Fields
id
ID!
Unique identifier of the role
createdAt
Time!
Creation timestamp
createdBy
UUID!
User identifier who created the role
updatedAt
Time
Last update timestamp
updatedBy
UUID
User identifier who last updated the role
deletedAt
Time
Deletion timestamp
deletedBy
UUID
User identifier who deleted the role
tenantID
UUID!
Tenant identifier
name
String!
Name of the role
description
String
Description of the role
Connection Fields
The users, groups, and policies fields return Connection objects that support pagination, filtering, and ordering.
users Connection
users(
after: Cursor
first: Int
before: Cursor
last: Int
orderBy: UserOrder
where: UserWhereInput
): UserConnection!groups Connection
policies Connection
after
Cursor
Returns elements after this cursor
first
Int
Returns the first n elements
before
Cursor
Returns elements before this cursor
last
Int
Returns the last n elements
orderBy
*Order
Ordering options (specific to each connection)
where
*WhereInput
Filtering options (specific to each connection)
Interfaces
Node
Usage Example
Query with Filtering on Policies
Relations
Role
M:NUser: A role can be assigned to multiple users, and users can have multiple rolesRole
M:NGroup: A role can be assigned to multiple groups, and groups can have multiple rolesRole
1:NAccessPolicy: A role has multiple access policies that define its permissions
Purpose
Roles are central to the system's RBAC implementation. They act as containers for access policies, which define what resources users can access and what actions they can perform. By assigning roles to users or groups, administrators can efficiently manage permissions across the system. The policies relationship connects roles to specific access controls defined in AccessPolicy entities.
Last updated
Was this helpful?
