Skip to content

Commit e04da93

Browse files
committed
feat(cells): Remove legacy non-org-scoped accept invite API route
The /api/0/accept-invite/{member_id}/{token}/ endpoint required no organization context, relying on a cell mapping lookup to determine the org. The org-scoped /api/0/accept-invite/{organization_id_or_slug}/{member_id}/{token}/ is now the only supported cell-safe route. This PR removes the legacy API route and any references to it: - Remove the URL pattern from api/urls.py - Remove the legacy pattern from controlsiloUrlPatterns.ts (regenerated) - Remove the legacy type from knownSentryApiUrls.generated.ts (regenerated) - Remove entries from the apidocs ownership and publish status allowlists Removing this route is harmless as the web UI has been updated to always use the new url in #112634. This is not a public URL that requires a formal deprecation process.
1 parent 32333c6 commit e04da93

File tree

5 files changed

+0
-9
lines changed

5 files changed

+0
-9
lines changed

src/sentry/api/urls.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3782,11 +3782,6 @@ def create_group_urls(name_prefix: str) -> list[URLPattern | URLResolver]:
37823782
DataExportNotificationsEndpoint.as_view(),
37833783
name="sentry-api-0-data-export-notifications",
37843784
),
3785-
re_path(
3786-
r"^accept-invite/(?P<member_id>[^/]+)/(?P<token>[^/]+)/$",
3787-
AcceptOrganizationInvite.as_view(),
3788-
name="sentry-api-0-accept-organization-invite",
3789-
),
37903785
re_path(
37913786
r"^notification-defaults/$",
37923787
NotificationDefaultsEndpoints.as_view(),

src/sentry/apidocs/api_ownership_allowlist_dont_modify.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@
5656
"/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/keys/{key_id}/",
5757
"/api/0/organizations/{organization_id_or_slug}/recent-searches/",
5858
"/api/0/organizations/{organization_id_or_slug}/projects/",
59-
"/api/0/accept-invite/{member_id}/{token}/",
6059
"/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/environments/{environment}/",
6160
"/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/releases/token/",
6261
"/api/0/organizations/{organization_id_or_slug}/searches/{search_id}/",

src/sentry/apidocs/api_publish_status_allowlist_dont_modify.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -809,7 +809,6 @@
809809
"/api/0/authenticators/": {"GET"},
810810
"/api/0/accept-transfer/": {"GET", "POST"},
811811
"/api/0/accept-invite/{organization_id_or_slug}/{member_id}/{token}/": {"GET", "POST"},
812-
"/api/0/accept-invite/{member_id}/{token}/": {"GET", "POST"},
813812
"/api/0/profiling/projects/{project_id}/profile/{profile_id}/": {"GET"},
814813
"/api/0/organizations/{organization_id_or_slug}/{var}/{issue_id}/participants/": {"GET"},
815814
"/api/0/{var}/{issue_id}/participants/": {"GET"},

static/app/data/controlsiloUrlPatterns.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@ export const controlsiloUrlPatterns: RegExp[] = [
154154
new RegExp('^api/0/authenticators/$'),
155155
new RegExp('^api/0/accept-invite/[^/]+/[^/]+/[^/]+/$'),
156156
new RegExp('^api/0/data-export/notifications/google-cloud/$'),
157-
new RegExp('^api/0/accept-invite/[^/]+/[^/]+/$'),
158157
new RegExp('^api/0/notification-defaults/$'),
159158
new RegExp('^api/0/sentry-apps-stats/$'),
160159
new RegExp('^api/0/doc-integrations/$'),

static/app/utils/api/knownSentryApiUrls.generated.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
export type KnownSentryApiUrls =
1111
| '/'
12-
| '/accept-invite/$memberId/$token/'
1312
| '/accept-invite/$organizationIdOrSlug/$memberId/$token/'
1413
| '/accept-transfer/'
1514
| '/api-applications/'

0 commit comments

Comments
 (0)