Projet

Général

Profil

0001-notifications-allow-session-user-to-call-ack-forget-.patch

Frédéric Péters, 05 septembre 2018 20:41

Télécharger (1,4 ko)

Voir les différences:

Subject: [PATCH] notifications: allow session user to call ack/forget API
 (#26154)

 combo/apps/notifications/api_views.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
combo/apps/notifications/api_views.py
16 16

  
17 17
from django.utils.encoding import force_text
18 18

  
19
from rest_framework import serializers, permissions, status
19
from rest_framework import authentication, serializers, permissions, status
20 20
from rest_framework.generics import GenericAPIView
21 21
from rest_framework.response import Response
22 22

  
......
67 67

  
68 68

  
69 69
class Ack(GenericAPIView):
70
    authentication_classes = (authentication.SessionAuthentication,)
70 71
    permission_classes = (permissions.IsAuthenticated,)
71 72

  
72 73
    def get(self, request, notification_id, *args, **kwargs):
......
77 78

  
78 79

  
79 80
class Forget(GenericAPIView):
81
    authentication_classes = (authentication.SessionAuthentication,)
80 82
    permission_classes = (permissions.IsAuthenticated,)
81 83

  
82 84
    def get(self, request, notification_id, *args, **kwargs):
83
-