HIGH story-role-based-access-control-organization-administrator-010 5 pts
5
Story Points
High
Priority
Role-Based Access Control
Feature

User Story

As a user
I want the app to fully reset its navigation stack when I switch roles
So that So that I do not see data or UI state from my previous role context after switching, preventing confusing mixed-role experiences or accidental actions taken in the wrong role

Acceptance Criteria

  • Given a user switches roles via the Role Switch Widget, when the role switch completes, then the navigation stack is fully cleared and the user lands on the home screen for the new role
  • Given a user was viewing a restricted screen under their previous role, when they switch to a different role, then the previous screen is not visible and back navigation does not return to it
  • Given a user was mid-way through a multi-step workflow such as an activity wizard when they initiated a role switch, when the switch completes, then the workflow is abandoned and the user is on the new role's home screen
  • Given the navigation reset has occurred, when the user presses the back button on the new home screen, then they are not navigated back to any screen from their previous role context
  • Given the role switch and navigation reset complete, when the user views the role switch widget, then it displays the newly active role name

Business Value

Coordinators frequently switch between their coordinator role and peer mentor views during a working session. Without a full navigation reset, they risk performing actions such as submitting registrations, approving expenses, or modifying contacts in the wrong role context, which would corrupt organizational data and potentially cause Bufdir reporting errors. The navigation reset aligns UI state with access control state at all times, acting as a key data integrity safeguard.