Skip to content

feat(auth): Clear active organization context - #123246

Open
evanpurkhiser wants to merge 2 commits into
masterfrom
git/feat-auth-clear-active-organization-context
Open

feat(auth): Clear active organization context#123246
evanpurkhiser wants to merge 2 commits into
masterfrom
git/feat-auth-clear-active-organization-context

Conversation

@evanpurkhiser

@evanpurkhiser evanpurkhiser commented Aug 31, 2026

Copy link
Copy Markdown
Member

Adds a private POST /api/0/auth/config/clear-organization/ action that clears the session's active organization.

This lets Auth V2 remove the server-side post-login fallback when a user clears the organization context from the login page.

@evanpurkhiser
evanpurkhiser requested review from a team as code owners August 31, 2026 21:16
@evanpurkhiser
evanpurkhiser requested a review from a team August 31, 2026 21:16
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Aug 31, 2026
Expose an auth-config DELETE operation that removes the session's active organization. This lets the login UI clear both its URL context and the server-side post-login fallback.
@evanpurkhiser
evanpurkhiser force-pushed the git/feat-auth-clear-active-organization-context branch from a48c855 to a9050ff Compare August 31, 2026 21:35
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Aug 31, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Backend Test Failures

Failures on 19f7f10 in this run:

tests/sentry/management/commands/test_generate_controlsilo_urls.py::TestGenerateControlsiloUrls::test_no_missing_urlslog
[gw0] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/management/commands/test_generate_controlsilo_urls.py:74: in test_no_missing_urls
    assert line in current_state, msg
E   AssertionError: 
E                 New control silo URL patterns detected!
E     
E                 The pattern:   new RegExp('^api/0/auth/config/clear-organization/$'),
E     
E                 Does not exist in the current pattern inventory. You should regenerate
E                 the pattern inventory with:
E     
E                 cd ../getsentry
E                 getsentry django generate_controlsilo_urls --format=js --output=../sentry/static/app/data/controlsiloUrlPatterns.ts
E     
E                 This command needs to be run in a getsentry environment
E                 in order to not lose patterns that are important for sentry.io
E                 
E   assert "  new RegExp('^api/0/auth/config/clear-organization/$')," in "// This is generated code.\n// To update it run `getsentry django generate_controlsilo_urls --format=js --output=/pat...gExp('^extensions/discord/link-identity/[^/]+/$'),\n  new RegExp('^extensions/discord/unlink-identity/[^/]+/$'),\n];\n"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant