RoleAssignmentWidget
Component Detail
User Interface
medium complexity
frontend
0
Dependencies
0
Dependents
2
Entities
0
Integrations
Description
Admin UI widget for viewing and updating a user's role within a specific local association. Renders a role selector with current role pre-filled and submits changes via the RoleAssignmentService. Provides inline feedback on success or failure and disables controls during pending requests.
role-assignment-widget
Sources & reasoning
Lines 325-328 include rolletildeling (role assignment) explicitly in the Admin Web Portal MVP scope. Lines 255-259 define four distinct roles with materially different access boundaries - Peer Mentor vs Coordinator vs Org Admin. Correct role assignment is the access-control mechanism determining what each user sees on mobile and whether they can reach the admin portal.
-
docs/source/likeperson.md · line 325-328- Brukeradministrasjon (invitere, deaktivere, rolletildeling)
-
docs/source/likeperson.md · line 255-259- **Coordinator:** Oversees peer mentors within their local association, dispatches assignments, approves expenses, registers on behalf of others. Logs in to the Mobile App only.
Responsibilities
- Display current role for a given user-association pairing
- Render role selector restricted to valid roles (Peer Mentor, Coordinator, Org Admin)
- Submit role change requests and surface validation or API errors inline
- Disable interaction while a role update is in flight
- Reflect updated role state immediately after successful assignment
Interfaces
renderRoleSelector(userId: string, associationId: string): void
onRoleChange(newRole: Role): void
showUpdateResult(result: UpdateResult): void
Related Data Entities (2)
Data entities managed by this component