Skip to content

feat(admin): Restrict /manage/ endpoint to non-SaaS modes#106530

Merged
michelletran-sentry merged 2 commits intomasterfrom
feat/disable-admin-ui-saas
Jan 20, 2026
Merged

feat(admin): Restrict /manage/ endpoint to non-SaaS modes#106530
michelletran-sentry merged 2 commits intomasterfrom
feat/disable-admin-ui-saas

Conversation

@michelletran-sentry
Copy link
Contributor

@michelletran-sentry michelletran-sentry commented Jan 19, 2026

Moves the admin UI endpoint (/manage/) behind a conditional check that only registers it when SENTRY_MODE is not SAAS. This ensures admin functionality is only available in self-hosted and single-tenant deployments.

The admin endpoint for SaaS is _admin/, which is unchanged. We just want to disable manage/ for SaaS.

ref: https://linear.app/getsentry/issue/ECO-945

The changes:

  • src/sentry/web/urls.py: Conditionally register the /manage/ endpoint only when not in SaaS mode
  • tests/sentry/web/frontend/test_react_page.py: Add test coverage verifying the endpoint is accessible in SELF_HOSTED and SINGLE_TENANT modes but not accessible in SAAS mode

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

@michelletran-sentry michelletran-sentry requested a review from a team January 19, 2026 19:15
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Jan 19, 2026
@linear
Copy link

linear bot commented Jan 19, 2026

  Moves the admin UI endpoint (/manage/) behind a conditional check that
  only registers it when SENTRY_MODE is not SAAS. This ensures admin
  functionality is only available in self-hosted and single-tenant deployments.

  The changes:
  - src/sentry/web/urls.py: Conditionally register the /manage/ endpoint only when not in SaaS mode
  - tests/sentry/web/frontend/test_react_page.py: Add test coverage verifying the endpoint is accessible in SELF_HOSTED and SINGLE_TENANT modes but not accessible in SAAS
Copy link
Contributor

@geoffg-sentry geoffg-sentry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beautiful

Copy link
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

The URL being pointed to here doesn't seem to work in SaaS mode anyways,
so will only point to this if the manage endpoint works.
@michelletran-sentry michelletran-sentry merged commit 7be714a into master Jan 20, 2026
66 checks passed
@michelletran-sentry michelletran-sentry deleted the feat/disable-admin-ui-saas branch January 20, 2026 19:45
@github-actions github-actions bot locked and limited conversation to collaborators Feb 5, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants