Skip to content

fix(organizations): Scope delete_organization_member by organization id#113793

Merged
michelletran-sentry merged 1 commit intomasterfrom
fix/delete-org-member-org-scoping
Apr 23, 2026
Merged

fix(organizations): Scope delete_organization_member by organization id#113793
michelletran-sentry merged 1 commit intomasterfrom
fix/delete-org-member-org-scoping

Conversation

@michelletran-sentry
Copy link
Copy Markdown
Contributor

The delete_organization_member RPC accepted an organization_id argument but never used it — the lookup only filtered by member id, so callers that passed an organization_id mismatching the member's actual organization still triggered a deletion. Include organization_id in the .get() filter so the method is a no-op (returns False) when the member is not in the supplied organization.

Add a regression test covering the accept-invite member-already-exists branch, where the URL-provided member_id belongs to a different organization than the one being accepted.

The `delete_organization_member` RPC accepted an `organization_id`
argument but never used it — the lookup only filtered by member id, so
callers that passed an organization_id mismatching the member's actual
organization still triggered a deletion. Include `organization_id` in
the `.get()` filter so the method is a no-op (returns False) when the
member is not in the supplied organization.

Add a regression test covering the accept-invite member-already-exists
branch, where the URL-provided member_id belongs to a different
organization than the one being accepted.

Co-Authored-By: Claude <noreply@anthropic.com>
@michelletran-sentry michelletran-sentry requested review from a team as code owners April 23, 2026 14:15
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Apr 23, 2026
@michelletran-sentry michelletran-sentry merged commit aa32ddf into master Apr 23, 2026
78 checks passed
@michelletran-sentry michelletran-sentry deleted the fix/delete-org-member-org-scoping branch April 23, 2026 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants