Repository navigation
fix(organizations): refuse self-leave for directory-managed members and keep the renamed name visible - #9609
Conversation
…nd keep the renamed name visible
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
[Medium impact] The PR appears safe to merge; no new actionable issues remain. SummaryBlocks directory-managed members from leaving while preserving administrator removal and keeping a saved organization name visible during refresh.
|
There was a problem hiding this comment.
All reported issues were addressed across 4 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. |
…nd explain why they stay
|
Design change in 4d78535: for a directory-managed owner, the leave is refused, the transfer is not. c2d5e0b refused transfer-and-leave up front. The settings UI always sends
|
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
Summary
removeUserFromOrganizationnow refuses self-removal for a directory-managed member (same transaction,SCIM_MANAGED_MEMBERSHIP) with a message pointing to the identity provider. The error shows in the existing Leave dialogorganization/membersremove op, and v2DELETE /organizations/{id}/members/{userId}, which share the use caseType of Change
Testing
managed-membership.integration.ts(real Postgres): managed self-leave refused and membership kept; admin removing the same managed member succeeds; unmanaged self-leave succeeds. 12/12; red with the check removed, and red with the self-only condition droppedbun run lint,check:boundaries,check:source-conventions,check:comment-hygiene,check:client-boundary, pre-pushtype-checkChecklist
test-auditauthoring gate)🤖 Generated with Claude Code