Auth & Hydration
Login strategy resolution, Moodle authentication flow, and institutional authority mapping.
When a user logs in, the AuthService resolves the appropriate login strategy based on priority ordering. Strategies are evaluated in order — the first one whose CanHandle() returns true is executed.
Login Strategy Resolution
Moodle Login Flow (Detail)
When the MoodleLoginStrategy handles the request, it performs full user hydration:
Institutional Authority Resolution (Dean Mapping)
The system automatically detects if a user has management authorities over specific categories (Campuses, Departments, or Programs).
- Capability Check: For each unique category a user is enrolled in, the system picks a representative course.
- Moodle Verification: It queries Moodle to see if the current user has the
moodle/category:managecapability in that context. - Role Persistence: If found, a
UserInstitutionalRole(e.g., 'dean') is recorded for that specific category. - Global Role Propagation: The user's global
rolesarray is updated to include 'dean' if any institutional authority is detected.