Skip to content
Draft
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
4 changes: 0 additions & 4 deletions src/sentry/api/bases/incident.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from rest_framework.exceptions import PermissionDenied
from rest_framework.request import Request

from sentry import features
from sentry.api.bases.organization import OrganizationEndpoint, OrganizationPermission
from sentry.api.exceptions import ResourceDoesNotExist
from sentry.api.utils import to_valid_int_id
Expand Down Expand Up @@ -37,9 +36,6 @@ def convert_args(
args, kwargs = super().convert_args(request, *args, **kwargs)
organization = kwargs["organization"]

if not features.has("organizations:incidents", organization, actor=request.user):
raise ResourceDoesNotExist

validated_incident_identifier = to_valid_int_id(
"incident_identifier", incident_identifier, raise_404=True
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from rest_framework.request import Request
from rest_framework.response import Response

from sentry import features
from sentry.api.api_owners import ApiOwner
from sentry.api.api_publish_status import ApiPublishStatus
from sentry.api.base import cell_silo_endpoint
Expand Down Expand Up @@ -69,9 +68,6 @@ def convert_args(
args, kwargs = OrganizationEndpoint.convert_args(self, request, *args, **kwargs)
organization = kwargs["organization"]

if not features.has("organizations:incidents", organization, actor=request.user):
raise ResourceDoesNotExist

if request.method == "GET":
gop: GroupOpenPeriod | None = None

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
from sentry.api.base import cell_silo_endpoint
from sentry.api.bases.incident import IncidentPermission
from sentry.api.bases.organization import OrganizationEndpoint
from sentry.api.exceptions import ResourceDoesNotExist
from sentry.api.helpers.deprecation import deprecated
from sentry.api.paginator import OffsetPaginator
from sentry.api.serializers import serialize
Expand Down Expand Up @@ -63,9 +62,6 @@ def get(self, request: Request, organization: Organization) -> Response:

:auth: required
"""
if not features.has("organizations:incidents", organization, actor=request.user):
raise ResourceDoesNotExist

# Parse query parameters (shared between both implementations)
projects = self.get_projects(request, organization)
envs = self.get_environments(request, organization)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from sentry.models.groupopenperiod import GroupOpenPeriod
from sentry.testutils.abstract import Abstract
from sentry.testutils.cases import APITestCase
from sentry.testutils.helpers.features import with_feature
from sentry.types.group import PriorityLevel
from sentry.workflow_engine.migration_helpers.alert_rule import migrate_alert_rule
from sentry.workflow_engine.models import IncidentGroupOpenPeriod
Expand Down Expand Up @@ -36,17 +35,10 @@ def user(self):
def test_no_perms(self) -> None:
incident = self.create_incident()
self.login_as(self.create_user())
with self.feature("organizations:incidents"):
resp = self.get_response(incident.organization.slug, incident.id)
assert resp.status_code == 403

def test_no_feature(self) -> None:
incident = self.create_incident()
resp = self.get_response(incident.organization.slug, incident.id)
assert resp.status_code == 404
assert resp.status_code == 403


@with_feature(["organizations:incidents"])
class WorkflowEngineIncidentDetailsTest(APITestCase):
endpoint = "sentry-api-0-organization-incident-details"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from sentry.workflow_engine.types import DetectorPriorityLevel


@with_feature(["organizations:incidents", "organizations:performance-view"])
@with_feature("organizations:performance-view")
class WorkflowEngineIncidentListTest(APITestCase):
endpoint = "sentry-api-0-organization-incident-index"

Expand Down
Loading