Skip to content

ref(issue-ownership): remove reassignment-from-own-team exception#112877

Open
cvxluo wants to merge 1 commit intomasterfrom
cvxluo/remove-reassignment-from-own-team-exception
Open

ref(issue-ownership): remove reassignment-from-own-team exception#112877
cvxluo wants to merge 1 commit intomasterfrom
cvxluo/remove-reassignment-from-own-team-exception

Conversation

@cvxluo
Copy link
Copy Markdown
Contributor

@cvxluo cvxluo commented Apr 13, 2026

In closed-membership orgs, users could previously assign a team they were not a member of, as long as they were a member of the currently assigned team. This exception (introduced in PR #106984) added significant complexity —we should remove the exception entirely. The rule is now: you can assign a team if you are a member of that team, have team:admin scope, or the org has open membership.

Practically, this consolidates all validation into OwnerActorField. This applies to all instances where you can assign a team as an owner, most notably issue ownership, but also alert ownership, etc. This makes assignment more restrictive, in preparation for making things more permissive for open membership cases: https://www.notion.so/sentry/permissive-ownership-assignments-3348b10e4b5d806e91b4cbf12af6a26c?source=copy_link

We realistically didn't need this exception — it's trivial for an org member to reassign something to a team they control, then to the target team.

In closed-membership orgs, users could previously assign a team they
were not a member of, as long as they were a member of the currently
assigned team. This exception (introduced in PR #106984) added
significant complexity: current_owner context plumbing, a
skip_team_validation escape hatch, and a 77-line
validate_bulk_reassignment function duplicating the auth logic.

Remove the exception entirely. The rule is now: you can assign a team
if you are a member of that team, have team:admin scope, or the org
has open membership. This eliminates the single-vs-bulk distinction
in validation, so OwnerActorField validates identically everywhere.

Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Apr 13, 2026
@cvxluo cvxluo changed the title ref(assign): Remove reassignment-from-own-team exception ref(issue-ownership): remove reassignment-from-own-team exception Apr 13, 2026
@cvxluo cvxluo marked this pull request as ready for review April 13, 2026 22:54
@cvxluo cvxluo requested review from a team as code owners April 13, 2026 22:54
Copy link
Copy Markdown
Member

@shashjar shashjar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

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