Skip to main content

Governance Roles Owners Demote Last Admin Shows Dialog

EPIC: governance
Personas & Authorization
STORY: roles_owners
As an admin, I can compose members' roles (Member base + Admin/Helper overlays) and household ownership through the capability-gated governance surface.
AC: demote_last_admin_shows_dialog
Toggling Admin OFF for the last admin surfaces the zero-last-admin rule (LastAdminCannotDemote) in the AlertDialog — never swallowed.

open governance - Mom shows the Admin badge

User Actions:
  • Tapped: widget with text "Household"
  • Tapped: widget with key [<'HouseholdPage.peopleButton'>]
Expect:
  • Mom's row shows the Admin role badge
Events:
  • [ANALYTIC] [page]: HouseholdRoute
  • MembersStarted
  • [ANALYTIC] [page]: GovernanceRoute
  • MembersStarted
  • RoleOwnerStarted

toggle Admin off - the zero-last-admin rule dialog appears

User Actions:
  • Tapped: widget with key [<'GovernancePage.memberTile_mom'>]
  • Tapped: widget with key [<'RoleOwnerEditor.adminToggle'>]
Expect:
  • the AlertDialog surfaces the zero-last-admin rule
  • the dialog carries the LastAdminCannotDemote message
Events:
  • RoleOwnerRoleSet