Skip to content

Commit

Permalink
fix: Add SessionAuthentication for inactive users api (#942)
Browse files Browse the repository at this point in the history
* fix: Add SessionAuthentication for inactive users api

Signed-off-by: Niket Shah <[email protected]>
  • Loading branch information
mrniket authored Apr 16, 2019
1 parent e718a83 commit 3c63d41
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions portal/views/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@

from rest_framework.decorators import api_view
from rest_framework.response import Response
from rest_framework.authentication import SessionAuthentication
from rest_framework import serializers, permissions, generics, status
from django.http import HttpResponse
from django.utils import timezone
Expand Down Expand Up @@ -121,6 +122,7 @@ class InactiveUsersView(generics.ListAPIView):
last_login__isnull=True,
date_joined__lte=timezone.now() - timezone.timedelta(days=THREE_YEARS_IN_DAYS),
)
authentication_classes = (SessionAuthentication,)
serializer_class = InactiveUserSerializer
permission_classes = (IsAdminOrGoogleAppEngine,)

Expand Down

0 comments on commit 3c63d41

Please sign in to comment.