fix(auth): preserve invite role over the Bunyip subscriber floor #324
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/PMS-458-preserve-invite-role-over-subscriber-floor"
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 tenant. That premise does not hold for a user accepting an 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 up toadminis an unintended privilege elevation that contradicts the invite.Gate the floor on invite presence in
place_bunyip_user: when this placement consumes a fresh invite, the invite role stands as-is and only a platform-level Bunyipadminclaim still overrides tosuper_admin; non-invite placements keep the PMS-447 floor unchanged. This restores the failing integration testinvited_user_lands_in_inviting_tenant_with_invite_rolewhile leaving the PMS-447 floor unit tests (which cover the non-invite local-role path) green.#PMS-458