Update all edx-platform REST endpoints to support JWT Auth (#34152)

* chore: update API endpoints to support default JWT auth

The default DRF Auth classes were recently updated to allow for both JWT and Session auth by default. Any endpoint that overrides the AUTHENTICATION_CLASSES but has just session, just JWT or just both of those should be updated to remove the override.

Details in https://github.com/openedx/edx-platform/issues/33662
This commit is contained in:
salmannawaz
2024-02-13 20:46:58 +05:00
committed by GitHub
parent 45547ca087
commit 57b480b04f
22 changed files with 1 additions and 86 deletions

View File

@@ -9,8 +9,6 @@ import pytz
import dateutil
from celery.states import REVOKED
from django.db import transaction
from edx_rest_framework_extensions.auth.jwt.authentication import JwtAuthentication
from rest_framework.authentication import SessionAuthentication
from rest_framework.response import Response
from rest_framework import generics, status
@@ -35,10 +33,6 @@ class ListScheduledBulkEmailInstructorTasks(generics.ListAPIView):
data also includes information about the and course email instance associated with each task.
* 403: User does not have the required role to view this data.
"""
authentication_classes = (
JwtAuthentication,
SessionAuthentication,
)
permission_classes = (
CanViewOrModifyScheduledBulkCourseEmailTasks,
)
@@ -74,10 +68,6 @@ class ModifyScheduledBulkEmailInstructorTask(generics.DestroyAPIView, generics.U
* 403: User does not have permission to modify the object specified.
* 404: Requested schedule object could not be found and thus could not be modified or removed.
"""
authentication_classes = (
JwtAuthentication,
SessionAuthentication,
)
permission_classes = (
CanViewOrModifyScheduledBulkCourseEmailTasks,
)