chore: update drf endpoints to use default authentication
This commit is contained in:
@@ -164,7 +164,6 @@ class BasketOrderView(APIView):
|
||||
Retrieve the order associated with a basket.
|
||||
"""
|
||||
|
||||
authentication_classes = (SessionAuthentication,)
|
||||
permission_classes = (IsAuthenticated,)
|
||||
|
||||
def get(self, request, *_args, **kwargs):
|
||||
|
||||
@@ -43,9 +43,6 @@ class FeatureBasedEnrollmentSupportAPIView(GenericAPIView):
|
||||
Support-only API View for getting feature based enrollment configuration details
|
||||
for a course.
|
||||
"""
|
||||
authentication_classes = (
|
||||
JwtAuthentication, SessionAuthentication
|
||||
)
|
||||
permission_classes = (IsAuthenticated,)
|
||||
|
||||
@method_decorator(require_support_permission)
|
||||
|
||||
@@ -31,7 +31,6 @@ class UserViewSet(viewsets.ReadOnlyModelViewSet):
|
||||
"""
|
||||
DRF class for interacting with the User ORM object
|
||||
"""
|
||||
authentication_classes = (authentication.SessionAuthentication,)
|
||||
permission_classes = (ApiKeyHeaderPermission,)
|
||||
queryset = User.objects.all().prefetch_related("preferences").select_related("profile")
|
||||
serializer_class = UserSerializer
|
||||
@@ -43,7 +42,6 @@ class ForumRoleUsersListView(generics.ListAPIView):
|
||||
"""
|
||||
Forum roles are represented by a list of user dicts
|
||||
"""
|
||||
authentication_classes = (authentication.SessionAuthentication,)
|
||||
permission_classes = (ApiKeyHeaderPermission,)
|
||||
serializer_class = UserSerializer
|
||||
paginate_by = 10
|
||||
@@ -67,7 +65,6 @@ class UserPreferenceViewSet(viewsets.ReadOnlyModelViewSet):
|
||||
"""
|
||||
DRF class for interacting with the UserPreference ORM
|
||||
"""
|
||||
authentication_classes = (authentication.SessionAuthentication,)
|
||||
permission_classes = (ApiKeyHeaderPermission,)
|
||||
queryset = UserPreference.objects.all()
|
||||
filter_backends = (DjangoFilterBackend,)
|
||||
@@ -81,7 +78,6 @@ class PreferenceUsersListView(generics.ListAPIView):
|
||||
"""
|
||||
DRF class for listing a user's preferences
|
||||
"""
|
||||
authentication_classes = (authentication.SessionAuthentication,)
|
||||
permission_classes = (ApiKeyHeaderPermission,)
|
||||
serializer_class = UserSerializer
|
||||
paginate_by = 10
|
||||
|
||||
Reference in New Issue
Block a user