Skip to content

Commit cd34707

Browse files
committed
restriction on public api for unauthenticated users
1 parent c2e735d commit cd34707

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

backend/src/events/views.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
from rest_framework.decorators import api_view
1+
from rest_framework.permissions import IsAuthenticated
2+
from rest_framework.decorators import api_view, permission_classes
23
from rest_framework.response import Response
34
from rest_framework import status
45

@@ -8,6 +9,7 @@
89
from ..incidents.services import is_valid_incident
910

1011
@api_view(['GET'])
12+
@permission_classes((IsAuthenticated, ))
1113
def get_event_trail(request, incident_id):
1214
if request.method == "GET":
1315
if is_valid_incident(incident_id):

0 commit comments

Comments
 (0)