Kaizen
Browse modulesAccessaccess/serverFunctions

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

ParameterType
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.createdAtDate
role.createdBystring | null
role.currentVersionIdstring | null
role.deletedAtDate | null
role.deletedBystring | null
role.descriptionstring | null
role.idstring
role.identifierstring
role.kindRbacRoleKind
role.namestring
role.organizationIdstring | null
role.statusRbacRoleStatus
role.statusUpdatedAtDate
role.statusUpdatedBystring | null
role.updatedAtDate
role.updatedBystring | 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.allowedGrantScopesJsonValue
version.assignableByOrgAdminsboolean
version.changeReasonstring | null
version.createdAtDate
version.createdBystring | null
version.deletedAtDate | null
version.deletedBystring | null
version.idstring
version.maxAssignableScopeRbacMaxAssignableScope
version.permissionsJsonValue
version.roleIdstring
version.systemManagedboolean
version.versionNumbernumber

Returns

CompiledRole

On this page