notifications: allow session user to call ack/forget API (#26154)
This commit is contained in:
parent
024c079043
commit
d4b4f4cb45
|
@ -16,7 +16,7 @@
|
|||
|
||||
from django.utils.encoding import force_text
|
||||
|
||||
from rest_framework import serializers, permissions, status
|
||||
from rest_framework import authentication, serializers, permissions, status
|
||||
from rest_framework.generics import GenericAPIView
|
||||
from rest_framework.response import Response
|
||||
|
||||
|
@ -67,6 +67,7 @@ add = Add.as_view()
|
|||
|
||||
|
||||
class Ack(GenericAPIView):
|
||||
authentication_classes = (authentication.SessionAuthentication,)
|
||||
permission_classes = (permissions.IsAuthenticated,)
|
||||
|
||||
def get(self, request, notification_id, *args, **kwargs):
|
||||
|
@ -77,6 +78,7 @@ ack = Ack.as_view()
|
|||
|
||||
|
||||
class Forget(GenericAPIView):
|
||||
authentication_classes = (authentication.SessionAuthentication,)
|
||||
permission_classes = (permissions.IsAuthenticated,)
|
||||
|
||||
def get(self, request, notification_id, *args, **kwargs):
|
||||
|
|
Loading…
Reference in New Issue