Repository navigation
fix(scim): scope the managed-membership lock to workspaces the member's directory groups map - #10381
Conversation
…'s directory groups map The lock refused every manual workspace grant for directory-provisioned members, including workspaces no group mapping reaches, so they could never be shared into new workspaces. It now owns org membership and role, plus workspace access that reconciliation itself sets through the member's mapped groups, derived from the same mapping rows and rules.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
There was a problem hiding this comment.
No issues found across 12 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
This PR changes authentication, authorization, or input validation. Ultrareviews find 2.4x more serious bugs than standard reviews. Comment @cubic-dev-ai ultrareview to run one.
Turn on auto-fix | Re-trigger cubic
[Medium impact] This PR appears safe to merge. SummaryThis PR limits directory-owned workspace access to a member’s mapped workspaces and grants still awaiting withdrawal. Other workspaces remain shareable by hand.
Reviews (3) · Last reviewed commit: "test(scim): cover the mapped-workspace l..." · Reviewed by Greptile |
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
All reported issues were addressed across 12 files
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
Summary
loadMappingRows+resolveDesiredGrants(movedloadMappingRowstoprojection/mapping-rows.ts), so the two can't drift.ensure-at-leastprovisioning is now refused explicitly for provisioned members (the blanket check used to cover it)Type of Change
Testing
scim-locked-invitations.integration.tsdrives the real v2 invitations route on PostgreSQL: unmapped workspace grants, mapped workspace refuses with no row written, provisioned member outside the mapped group is granted, provisioned non-member is refused with no invitationmembers.integration.ts: role change allowed on an unmapped workspace,SCIM_MANAGED_MEMBERSHIPkept on a workspace the member's group is mapped tomanaged-membership.integration.ts, related unit suites (ee/scim, invitations, permissions route, enterprise provisioning, member manager) and biome on changed files pass; type-check,check:auditsand the full suite run in CIChecklist
test-auditauthoring gate)