Data Layer low complexity Shared Component backend
0
Dependencies
1
Dependents
0
Entities
0
Integrations

Description

User Roles Table

Feature: Role Assignment

user-roles-table

Responsibilities

  • Store current role-to-user mappings as the authoritative source for authorization decisions across the platform
  • Support efficient role lookups by user ID and organization ID for token refresh claims
  • Expose role history queries for audit and compliance reporting

Interfaces

getUserRole(userId: string, organizationId: string): Promise<string>
setUserRole(userId: string, organizationId: string, role: string): Promise<void>
getRolesByOrganization(organizationId: string): Promise<UserRoleRecord[]>
getUserRoleHistory(userId: string): Promise<RoleHistoryRecord[]>

Relationships

Dependents (1)

Components that depend on this component