Repository navigation
Conversation
gricha
force-pushed
the
ref/sa-narrow-explore
branch
from
November 1, 2026 04:24
6d91bbc to
51071bb
Compare
Explore and Discover saved queries, the homepage query, stars and dashboards read the caller through `sentry.auth.principal`, following the issue-views pattern from #129401: shared rows for everyone, personal state (stars, last visited, "created by me") only for a user. - A service account can list saved queries and Discover's `myqueries` (shared rows, nothing starred), the homepage GET returns 204, visits count without a last-visited row, and a query created with `starred` is created unstarred. Stars, favorites and homepage PUT are 403 `user-required`. Lists and creates skip personal state up front instead of reporting a caught `UserRequired` to Sentry on every call. New tests cover each; they fail on the old code. - Token callers: Discover `sortBy=myqueries` no longer sorts creator-less queries first, and Explore's visit endpoint returns 204 instead of a 500 (NOT NULL write): the visit counts, with no last-visited row, as Discover and dashboard visits already did. - Users and agents see no change. Left: `organization_dashboards.py` calls `has_edit_permissions(request.user.id)`, which needs to take the caller; and `DashboardListSerializer` still reads `user.id`, so a service account listing a non-empty set of dashboards still gets 403. Both are in the serializer follow-up.
gricha
force-pushed
the
ref/sa-narrow-explore
branch
from
November 1, 2026 04:57
51071bb to
e09a478
Compare
Contributor
decision-model-linterapi
decision-model-linter: 36 calls on 12 files, 79,785 input tokens, $0.0034, model typesafe/jev-1.13-20260917 |
This branch has not been deployed
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.
Explore and Discover saved queries, the homepage query, stars and dashboards read the caller through
sentry.auth.principal, following the issue-views pattern from #129401: shared rows for everyone, personal state (stars, last visited, "created by me") only for a user.myqueries(shared rows, nothing starred), the homepage GET returns 204, visits count without a last-visited row, and a query created withstarredis created unstarred. Stars, favorites and homepage PUT are 403user-required. Lists and creates skip personal state up front instead of reporting a caughtUserRequiredto Sentry on every call. New tests cover each; they fail on the old code.sortBy=myqueriesno longer sorts creator-less queries first, and Explore's visit endpoint returns 204 instead of a 500 (NOT NULL write): the visit counts, with no last-visited row, as Discover and dashboard visits already did.Left:
organization_dashboards.pycallshas_edit_permissions(request.user.id), which needs to take the caller; andDashboardListSerializerstill readsuser.id, so a service account listing a non-empty set of dashboards still gets 403. Both are in the serializer follow-up.