Function: compileRole()
function compileRole(role: {
createdAt: Date;
createdBy: string | null;
currentVersionId: string | null;
deletedAt: Date | null;
deletedBy: string | null;
description: string | null;
id: string;
identifier: string;
kind: RbacRoleKind;
name: string;
organizationId: string | null;
status: RbacRoleStatus;
statusUpdatedAt: Date;
statusUpdatedBy: string | null;
updatedAt: Date;
updatedBy: string | null;
}, version: {
allowedGrantScopes: JsonValue;
assignableByOrgAdmins: boolean;
changeReason: string | null;
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
id: string;
maxAssignableScope: RbacMaxAssignableScope;
permissions: JsonValue;
roleId: string;
systemManaged: boolean;
versionNumber: number;
}): CompiledRole;Defined in: server/access/role-service.ts:293
Compile a role row + its current version into the evaluation-ready shape.
Parameters
| Parameter | Type |
|---|---|
role | { createdAt: Date; createdBy: string | null; currentVersionId: string | null; deletedAt: Date | null; deletedBy: string | null; description: string | null; id: string; identifier: string; kind: RbacRoleKind; name: string; organizationId: string | null; status: RbacRoleStatus; statusUpdatedAt: Date; statusUpdatedBy: string | null; updatedAt: Date; updatedBy: string | null; } |
role.createdAt | Date |
role.createdBy | string | null |
role.currentVersionId | string | null |
role.deletedAt | Date | null |
role.deletedBy | string | null |
role.description | string | null |
role.id | string |
role.identifier | string |
role.kind | RbacRoleKind |
role.name | string |
role.organizationId | string | null |
role.status | RbacRoleStatus |
role.statusUpdatedAt | Date |
role.statusUpdatedBy | string | null |
role.updatedAt | Date |
role.updatedBy | string | null |
version | { allowedGrantScopes: JsonValue; assignableByOrgAdmins: boolean; changeReason: string | null; createdAt: Date; createdBy: string | null; deletedAt: Date | null; deletedBy: string | null; id: string; maxAssignableScope: RbacMaxAssignableScope; permissions: JsonValue; roleId: string; systemManaged: boolean; versionNumber: number; } |
version.allowedGrantScopes | JsonValue |
version.assignableByOrgAdmins | boolean |
version.changeReason | string | null |
version.createdAt | Date |
version.createdBy | string | null |
version.deletedAt | Date | null |
version.deletedBy | string | null |
version.id | string |
version.maxAssignableScope | RbacMaxAssignableScope |
version.permissions | JsonValue |
version.roleId | string |
version.systemManaged | boolean |
version.versionNumber | number |