Skip to content

Commit

Permalink
ref(crons): Fix permission class on ProjectProcessingErrorsIndex endp…
Browse files Browse the repository at this point in the history
…oint (#73094)

Before, only admins could dismiss these errors because I forgot to
override the permissions here
  • Loading branch information
davidenwang committed Jun 20, 2024
1 parent 54c67da commit 495754e
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from drf_spectacular.utils import extend_schema
from rest_framework.exceptions import ValidationError
from rest_framework.permissions import BasePermission
from rest_framework.request import Request
from rest_framework.response import Response

Expand All @@ -17,13 +18,16 @@
)
from sentry.apidocs.parameters import GlobalParams
from sentry.models.project import Project
from sentry.monitors.endpoints.base import ProjectMonitorPermission
from sentry.monitors.processing_errors.errors import ProcessingErrorType
from sentry.monitors.processing_errors.manager import delete_errors_for_project_by_type


@region_silo_endpoint
@extend_schema(tags=["Crons"])
class ProjectProcessingErrorsIndexEndpoint(ProjectEndpoint):
permission_classes: tuple[type[BasePermission], ...] = (ProjectMonitorPermission,)

publish_status = {
"DELETE": ApiPublishStatus.PRIVATE,
}
Expand Down

0 comments on commit 495754e

Please sign in to comment.