fix(auth): gate PMS-447 subscriber-Admin floor on invite absence #325
No reviewers
Labels
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
psa-systems/mokosh-server!325
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/PMS-447-preserve-invite-role"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
PMS-447 added a single-tenancy admin floor that translates a
subscriber(or unknown) Bunyip claim toAdmin, on the premise that every signed-in Bunyip user owns their own one-person Mokosh tenant. That premise breaks for a user accepting a role-bearing invite into a SHARED org tenant: the inviting admin's chosen role (e.g.manager) is a deliberate least-privilege grant, and silently flooring it toAdminis an unintended elevation that contradicts the invite. The CIinvited_user_lands_in_inviting_tenant_with_invite_rolefailure was exactly this: invite rolemanagerwas floored toadmin.Gate the floor on invite presence in
place_bunyip_user: when the placement consumes a fresh invite the invite role stands as-is and only a platform-level Bunyipadminclaim still overrides toSuperAdmin; non-invite placements keep the PMS-447 floor unchanged. The PMS-447 floor unit tests (which exercise the non-invite local-role path) stay green.#PMS-447