Repository navigation
ref(typing): Let issue search take a service account - #129609
Merged
Merged
Conversation
gricha
force-pushed
the
ref/sa-issue-search
branch
from
November 3, 2026 00:27
37b0910 to
07a2de4
Compare
gricha
force-pushed
the
ref/sa-issue-search
branch
from
November 3, 2026 00:34
07a2de4 to
5928109
Compare
Contributor
Sentry Snapshot Testing
|
gricha
force-pushed
the
ref/sa-issue-search
branch
2 times, most recently
from
November 3, 2026 04:41
edb5caf to
f492b6e
Compare
gricha
force-pushed
the
ref/sa-issue-search
branch
from
November 3, 2026 19:53
f492b6e to
c0e1844
Compare
gricha
force-pushed
the
ref/sa-issue-search
branch
from
November 3, 2026 20:01
c0e1844 to
57a3a03
Compare
gricha
force-pushed
the
ref/sa-issue-search
branch
from
November 3, 2026 20:09
57a3a03 to
1006728
Compare
armenzg
approved these changes
Nov 3, 2026
azulus
approved these changes
Nov 3, 2026
gricha
force-pushed
the
ref/sa-issue-search
branch
2 times, most recently
from
November 3, 2026 21:10
a4ccf2a to
2234f4f
Compare
cvxluo
approved these changes
Nov 3, 2026
gricha
force-pushed
the
ref/sa-issue-search
branch
from
November 3, 2026 23:19
2234f4f to
43dc84a
Compare
Type the issue search helpers with RequestPrincipal, dropping five files from the request.user allowlist. get_teams_for_users skips callers with no user, so a service account searching assigned:my_teams matches no teams instead of failing with 403.
gricha
force-pushed
the
ref/sa-issue-search
branch
from
November 4, 2026 00:44
43dc84a to
cf654d3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Let the issue search helpers take any
RequestPrincipal, which drops 5 files (6 errors) from therequest.usermypy allowlist (22 → 17).Type-only, with one runtime change for service accounts:
get_teams_for_usersnow skips callers with no user (has_user) instead of reading.id.assigned:my_teamsbeforeuser_id IN (NULL))user_id IN ())user-requiredassigned:mealready resolved to "nobody" for every caller without a user (parse_user_value), so a service account now gets the same answer for both.test_service_account_has_no_teams_or_self_to_search_byfails without this change:Files leaving the allowlist:
organization_issues_count.py,group_events.py,group_event_details.py,api/helpers/group_index/index.py,organization_detector_index.py.Known gap, not changed here:
record_advanced_search_feature_gatedrecords a service account'sServiceAccountIdas the analyticsuser_id; it's an untyped signal receiver, so the plugin doesn't see it.