feat(admin): show authorized applications on user detail page#117540
feat(admin): show authorized applications on user detail page#117540souredoutlook wants to merge 1 commit into
Conversation
Add an Authorized Applications card to the gsAdmin user details page, showing each OAuth app the user has granted access to (app name, homepage URL, scopes, and org scope if limited). Backend: extend GET /api-authorizations/ to accept a userId query param when the requester is in elevated (superuser) mode, mirroring the existing pattern in /api-tokens/. Frontend: new UserAuthorizedApps component rendered as a panel section in UserDetails alongside Customers and Emails. Refs: https://sentry.sentry.io/issues/?project=1 Co-Authored-By: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
|
🚨 Warning: This pull request contains Frontend and Backend changes! It's discouraged to make changes to Sentry's Frontend and Backend in a single pull request. The Frontend and Backend are not atomically deployed. If the changes are interdependent of each other, they must be separated into two pull requests and be made forward or backwards compatible, such that the Backend or Frontend can be safely deployed independently. Have questions? Please ask in the |
📊 Type Coverage Diff
🔍 2 new type safety issues introduced
This is informational only and does not block the PR. |
|
This pull request has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you add the label "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
Summary
Implements the user feedback asking to show authorized (OAuth) applications in the admin UI.
Adds an Authorized Applications panel to the gsAdmin user detail page, appearing after the Emails section — showing the same data a user sees on their own account settings page:
Changes
Backend —
src/sentry/api/endpoints/api_authorizations.pyExtends
GET /api-authorizations/to accept auserIdquery param when the requester is in elevated (superuser) mode. Mirrors the existing pattern in/api-tokens/(get_appropriate_user_id).Frontend
static/gsAdmin/components/users/userAuthorizedApps.tsx—UserAuthorizedAppspanel componentstatic/gsAdmin/views/userDetails.tsx— fetches/api-authorizations/?userId=…and renders the new panel as a bottom sectionstatic/gsAdmin/views/userDetails.spec.tsx— adds the required mock response for/api-authorizations/Testing
userIdlookup and regression test confirming non-superusers can't view other users' authorizationsView Session in Sentry