Skip to content

Enhance role management for managers - #105

Merged
flymia merged 4 commits into
mainfrom
feature/role-management
Jul 23, 2026
Merged

flymia merged 4 commits into
mainfrom
feature/role-management

Conversation

@flymia

@flymia flymia commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

This adds a few things:

  • Managers can now see the airline members and change their role.
  • Every founder of an airline becomes an "Owner". This has the essentially the same permissions as a manager, but an Owner is unable to be downgraded to a Dispatcher/Pilot. Only a "Transfer Ownership" does this. This is to protect an evil pilot, who becomes a manager and downgrades all the others.
  • Implement tests for this

flymia added 4 commits July 23, 2026 11:25
- Add Members page under Management for per-airline role changes (Pilot/Dispatcher/Manager)
- Managers can promote/demote members and remove them from the airline
- Guard against leaving an airline with zero Managers on demote or removal
- Role changes and removals are activity-logged at INFO level
- Wire route, navbar dropdown, and sidebar entries; add Feature test coverage
- Add owner_user_id foreign key to airlines table with migration backfill
- Assign owner_user_id to founder during setup and airline creation
- Restrict manager management (create, demote, remove) to the Owner
- Prevent owner demotion or removal from the airline
- Implement ownership transfer mechanism in MemberController and UI
- Add comprehensive feature test coverage in MemberManagementTest
@flymia
flymia merged commit bea5232 into main Jul 23, 2026
1 check passed
@flymia
flymia deleted the feature/role-management branch July 23, 2026 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant