Role Authorization Service
Component Detail
Service Layer
high complexity
mobile
0
Dependencies
0
Dependents
15
Entities
0
Integrations
Description
Core BLoC-based service that manages the active role state for the current session. Evaluates which roles a user holds, determines the active organizational context, and exposes role-gated permission checks consumed by the Permission Guard. Integrates with Riverpod for dependency injection across the widget tree.
role-authorization-service
Responsibilities
- Load and cache user roles and memberships from repository
- Manage active role and organization context state
- Expose permission check API for route guards and UI components
- Handle role switching and permission re-evaluation
Interfaces
initialize(userId)
getActiveRole()
getActiveOrganization()
setActiveRole(roleId)
setActiveOrganization(orgId)
hasPermission(permission)
getAvailableRoles()
clearSession()
Related Data Entities (15)
Data entities managed by this component
Activity
22 fields
core
Assignment
21 fields
core
Authentication Session
18 fields
audit
Bufdir Report
19 fields
derived
Bulk Registration
16 fields
core
Contact
20 fields
core
Course Enrollment
17 fields
core
Delegation Grant
8 fields
audit
Event
20 fields
core
Organization
14 fields
core
Reimbursement Approval
17 fields
core
User
17 fields
core
User Organization Membership
13 fields
core
User Role
15 fields
core
Workshop Participant
12 fields
core