Role Switch Widget
Component Detail
User Interface
medium complexity
mobile
0
Dependencies
0
Dependents
1
Entities
0
Integrations
Description
An in-app widget that allows users with multiple roles to toggle their active role without re-authenticating. Re-evaluates permissions on switch and triggers a full navigation reset to prevent stale UI state from the prior role context. Visible only to users who hold more than one role.
role-switch-widget
Responsibilities
- Display available roles for the current user
- Handle role switch without re-authentication
- Trigger permission re-evaluation and navigation reset on switch
Interfaces
buildRoleMenu(availableRoles)
onRoleSelected(roleId)
showSwitchConfirmation()
getCurrentRoleLabel()