Skip to content

ref(issue-ownership): allow all assignments when open membership is on#111809

Draft
cvxluo wants to merge 2 commits intomasterfrom
cvxluo/allow-assigning-any-org-team-when-open-membership-
Draft

ref(issue-ownership): allow all assignments when open membership is on#111809
cvxluo wants to merge 2 commits intomasterfrom
cvxluo/allow-assigning-any-org-team-when-open-membership-

Conversation

@cvxluo
Copy link
Copy Markdown
Contributor

@cvxluo cvxluo commented Mar 30, 2026

Issue ownership assignment permissions have a lot of edge cases around open membership / non-open membership orgs right now (more details). Proposed solution here is to allow all assignments when open membership is on, which significantly simplifies the number of cases and is more in line with user expectations. No changes for non-open membership (yet).

cvxluo and others added 2 commits March 30, 2026 11:09
…p is on

With open membership (allow_joinleave), users can join any team and thus
gain access to any project. The user assignee validation now checks org
membership instead of project membership in this case.


Co-authored-by: Claude <noreply@anthropic.com>
…is on

With open membership (allow_joinleave), skip the team-must-have-project-access
check. The team's org membership is already validated upstream by
ActorField.to_internal_value via parse_and_validate_actor.


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 Mar 30, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 30, 2026

Backend Test Failures

Failures on 3c0e53e in this run:

tests/sentry/integrations/slack/webhooks/actions/test_status.py::StatusActionTest::test_assign_issue_where_team_not_in_projectlog
[gw1] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/integrations/slack/webhooks/actions/test_status.py:608: in test_assign_issue_where_team_not_in_project
    assert resp.data["text"].endswith("Cannot assign to a team without access to the project")
E   AssertionError: assert False
E    +  where False = <built-in method endswith of str object at 0x7f4c37873f30>('Cannot assign to a team without access to the project')
E    +    where <built-in method endswith of str object at 0x7f4c37873f30> = '[wise-liger] IntegrationError: Identity not found.'.endswith
tests/sentry/integrations/slack/webhooks/actions/test_status.py::StatusActionTest::test_assign_issue_where_team_not_in_project_through_unfurllog
[gw1] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/integrations/slack/webhooks/actions/test_status.py:622: in test_assign_issue_where_team_not_in_project_through_unfurl
    assert resp.data["text"].endswith("Cannot assign to a team without access to the project")
E   AssertionError: assert False
E    +  where False = <built-in method endswith of str object at 0x7f95d871d170>('Cannot assign to a team without access to the project')
E    +    where <built-in method endswith of str object at 0x7f95d871d170> = '[smiling-newt] IntegrationError: Identity not found.'.endswith
tests/sentry/issues/endpoints/test_group_details.py::GroupUpdateTest::test_assign_unavailable_teamlog
[gw0] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/issues/endpoints/test_group_details.py:619: in test_assign_unavailable_team
    assert response.status_code == 400, response.content
E   AssertionError: b'{"id":"35","shareId":null,"shortId":"BAR-1","title":"Hello world","culprit":null,"permalink":"http://testserver/orga...d":false,"count":"1","userCount":0,"firstSeen":"2026-03-30T18:36:08.097769Z","lastSeen":"2026-03-30T18:36:08.097763Z"}'
E   assert 200 == 400
E    +  where 200 = <Response status_code=200, "application/json">.status_code

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.

1 participant