Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Added SessionAuthentication in learnerSubscriptionViewSet #550

Merged
merged 1 commit into from
Dec 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion license_manager/apps/api/v1/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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'
Expand Down
Loading