Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


@control_silo_endpoint
class OrgAuthTokenDetailsEndpoint(ControlSiloOrganizationEndpoint):
class OrganizationAuthTokenDetailsEndpoint(ControlSiloOrganizationEndpoint):
publish_status = {
"DELETE": ApiPublishStatus.PRIVATE,
"GET": ApiPublishStatus.PRIVATE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@


@control_silo_endpoint
class OrgAuthTokensEndpoint(ControlSiloOrganizationEndpoint):
class OrganizationAuthTokensEndpoint(ControlSiloOrganizationEndpoint):
publish_status = {
"GET": ApiPublishStatus.PRIVATE,
"POST": ApiPublishStatus.PRIVATE,
Expand Down
10 changes: 6 additions & 4 deletions src/sentry/api/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
from sentry.api.endpoints.group_autofix_setup_check import GroupAutofixSetupCheck
from sentry.api.endpoints.group_integration_details import GroupIntegrationDetailsEndpoint
from sentry.api.endpoints.group_integrations import GroupIntegrationsEndpoint
from sentry.api.endpoints.org_auth_token_details import OrgAuthTokenDetailsEndpoint
from sentry.api.endpoints.org_auth_tokens import OrgAuthTokensEndpoint
from sentry.api.endpoints.organization_auth_token_details import (
OrganizationAuthTokenDetailsEndpoint,
)
from sentry.api.endpoints.organization_auth_tokens import OrganizationAuthTokensEndpoint
from sentry.api.endpoints.organization_events_anomalies import OrganizationEventsAnomaliesEndpoint
from sentry.api.endpoints.organization_events_root_cause_analysis import (
OrganizationEventsRootCauseAnalysisEndpoint,
Expand Down Expand Up @@ -1903,12 +1905,12 @@ def create_group_urls(name_prefix: str) -> list[URLPattern | URLResolver]:
),
re_path(
r"^(?P<organization_id_or_slug>[^\/]+)/org-auth-tokens/$",
OrgAuthTokensEndpoint.as_view(),
OrganizationAuthTokensEndpoint.as_view(),
name="sentry-api-0-org-auth-tokens",
),
re_path(
r"^(?P<organization_id_or_slug>[^\/]+)/org-auth-tokens/(?P<token_id>[^\/]+)/$",
OrgAuthTokenDetailsEndpoint.as_view(),
OrganizationAuthTokenDetailsEndpoint.as_view(),
name="sentry-api-0-org-auth-token-details",
),
re_path(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
"JiraSearchEndpoint",
"JiraServerSearchEndpoint",
"KeyTransactionEndpoint",
"OrgAuthTokensEndpoint",
"OrganizationAccessRequestDetailsEndpoint",
"OrganizationAlertRuleAvailableActionIndexEndpoint",
"OrganizationApiKeyIndexEndpoint",
"OrganizationAuthProvidersEndpoint",
"OrganizationAuthTokensEndpoint",
"OrganizationDeriveCodeMappingsEndpoint",
"OrganizationEnvironmentsEndpoint",
"OrganizationEventsFacetsEndpoint",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@


@control_silo_test
class OrgAuthTokenDetailTest(APITestCase):
class OrganizationAuthTokenDetailTest(APITestCase):
endpoint = "sentry-api-0-org-auth-token-details"

def test_simple(self):
Expand Down Expand Up @@ -125,7 +125,7 @@ def test_get_deleted(self):


@control_silo_test
class OrgAuthTokenEditTest(APITestCase):
class OrganizationAuthTokenEditTest(APITestCase):
endpoint = "sentry-api-0-org-auth-token-details"
method = "PUT"

Expand Down Expand Up @@ -283,7 +283,7 @@ def test_update_deleted(self):


@control_silo_test
class OrgAuthTokenDeleteTest(APITestCase):
class OrganizationAuthTokenDeleteTest(APITestCase):
endpoint = "sentry-api-0-org-auth-token-details"
method = "DELETE"

Expand Down Expand Up @@ -374,7 +374,7 @@ def test_delete_deleted(self):


@control_silo_test
class OrgAuthTokenDetailsPermissionTest(PermissionTestCase):
class OrganizationAuthTokenDetailsPermissionTest(PermissionTestCase):
putData = {"name": "token-1"}

def setUp(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


@control_silo_test
class OrgAuthTokensListTest(APITestCase):
class OrganizationAuthTokensListTest(APITestCase):
endpoint = "sentry-api-0-org-auth-tokens"

def test_simple(self):
Expand Down Expand Up @@ -108,7 +108,7 @@ def test_other_org(self):


@control_silo_test(regions=create_test_regions("us"))
class OrgAuthTokenCreateTest(APITestCase):
class OrganizationAuthTokenCreateTest(APITestCase):
endpoint = "sentry-api-0-org-auth-tokens"
method = "POST"

Expand Down Expand Up @@ -188,7 +188,7 @@ def test_other_org(self):


@control_silo_test
class OrgAuthTokensPermissionTest(PermissionTestCase):
class OrganizationAuthTokensPermissionTest(PermissionTestCase):
postData = {"name": "token-1"}

def setUp(self):
Expand Down
Loading