ref(dashboards): Update generate dashboard endpoint permission check#111803
Merged
edwardgou-sentry merged 4 commits intoMar 30, 2026
Merged
Conversation
DominikB2014
approved these changes
Mar 30, 2026
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Autofix Details
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Test patches nonexistent function after rename
- Updated the @patch decorator in test_post_without_seer_access_returns_403 to use the renamed function has_seer_access_with_detail instead of the old name has_seer_explorer_access_with_detail.
Or push these changes by commenting:
@cursor push 8969617cd9
Preview (8969617cd9)
diff --git a/tests/sentry/dashboards/endpoints/test_organization_dashboard_generate.py b/tests/sentry/dashboards/endpoints/test_organization_dashboard_generate.py
--- a/tests/sentry/dashboards/endpoints/test_organization_dashboard_generate.py
+++ b/tests/sentry/dashboards/endpoints/test_organization_dashboard_generate.py
@@ -64,7 +64,7 @@
assert response.status_code == 403
@patch(
- "sentry.dashboards.endpoints.organization_dashboard_generate.has_seer_explorer_access_with_detail"
+ "sentry.dashboards.endpoints.organization_dashboard_generate.has_seer_access_with_detail"
)
def test_post_without_seer_access_returns_403(self, mock_has_access: MagicMock) -> None:
mock_has_access.return_value = (False, "AI features are disabled for this organization.")This Bugbot Autofix run was free. To enable autofix for future PRs, go to the Cursor dashboard.
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
NicoHinderling
added a commit
that referenced
this pull request
Apr 1, 2026
…t response (#111976) Adds the ability for users to approve snapshot comparison results via a new API endpoint, and surfaces approval status in the snapshot details response. **Approve endpoint** (`POST /preprodartifacts/{id}/approve/`): - Accepts a `feature_type` (`snapshots` or `size`) and creates an `APPROVED` record for the requesting user - Cleans up any existing `NEEDS_APPROVAL` records for that artifact/feature - Re-triggers the relevant status check task so the VCS commit status updates immediately **Snapshot response changes**: - Adds `approval_info` to the snapshot details response containing the current approval status (`approved` or `requires_approval`) and a list of approvers - Supports both Sentry users and GitHub users (via `extras` on the approval record) with avatar URLs Stacked on #111803
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.


Update permission check to look for
gen-ai-features, instead of usinghas_seer_explorer_access_with_detailwhich checks forseer-explorerflags.