From c74528eac2d6e602653772cb032eac218925273f Mon Sep 17 00:00:00 2001 From: zamanafzal Date: Sat, 30 Dec 2023 00:16:54 +0500 Subject: [PATCH] refactor: Added SessionAuthentication in learnerSubscriptionViewSet --- license_manager/apps/api/v1/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/license_manager/apps/api/v1/views.py b/license_manager/apps/api/v1/views.py index 9eadcf21..d1b34b65 100644 --- a/license_manager/apps/api/v1/views.py +++ b/license_manager/apps/api/v1/views.py @@ -17,6 +17,7 @@ JwtAuthentication, ) from rest_framework import filters, permissions, status, viewsets +from rest_framework.authentication import SessionAuthentication from rest_framework.decorators import action from rest_framework.exceptions import ParseError from rest_framework.mixins import ListModelMixin @@ -266,7 +267,7 @@ def _check_subscription_licenses(self, customer_agreement, plan, user_email): class LearnerSubscriptionViewSet(PermissionRequiredForListingMixin, viewsets.ReadOnlyModelViewSet): """ Viewset for read operations on LearnerSubscriptionPlans.""" - authentication_classes = [JwtAuthentication] + authentication_classes = [JwtAuthentication, SessionAuthentication] permission_classes = [permissions.IsAuthenticated] lookup_field = 'uuid'