fix(auth): gate PMS-447 subscriber-Admin floor on invite absence #325

Merged
YousifShkara merged 1 commit from fix/PMS-447-preserve-invite-role into main 2026-06-21 06:13:53 +02:00
Owner

PMS-447 added a single-tenancy admin floor that translates a subscriber (or unknown) Bunyip claim to Admin, 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 to Admin is an unintended elevation that contradicts the invite. The CI invited_user_lands_in_inviting_tenant_with_invite_role failure was exactly this: invite role manager was floored to admin.

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 Bunyip admin claim still overrides to SuperAdmin; 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

PMS-447 added a single-tenancy admin floor that translates a `subscriber` (or unknown) Bunyip claim to `Admin`, 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 to `Admin` is an unintended elevation that contradicts the invite. The CI `invited_user_lands_in_inviting_tenant_with_invite_role` failure was exactly this: invite role `manager` was floored to `admin`. 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 Bunyip `admin` claim still overrides to `SuperAdmin`; 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
fix(auth): gate PMS-447 subscriber-Admin floor on invite absence
All checks were successful
Create release / Create release from merged PR (pull_request) Has been skipped
E2E / Playwright against staging (pull_request) Successful in 37s
Check / fmt + clippy + compile + unit/doc tests (pull_request) Successful in 1m29s
Integration / integration tests (pull_request) Successful in 4m55s
1e0efe342e
PMS-447 added a single-tenancy admin floor that translates a `subscriber` (or unknown) Bunyip claim to `Admin`, 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 to `Admin` is an unintended elevation that contradicts the invite. The CI `invited_user_lands_in_inviting_tenant_with_invite_role` failure was exactly this: invite role `manager` was floored to `admin`.

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 Bunyip `admin` claim still overrides to `SuperAdmin`; 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
YousifShkara deleted branch fix/PMS-447-preserve-invite-role 2026-06-21 06:13:53 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/mokosh-server!325
No description provided.