chore: remove dependency on rest_condition (#28663)
rest-condition has not been updated for a while, and with DRF 3.9 it is no longer needed since the ability to combine Permission classes using boolean operators is now provided by DRF directly.
This commit is contained in:
@@ -8,7 +8,6 @@ from django.http import Http404
|
||||
from edx_django_utils.monitoring import set_custom_attribute
|
||||
from opaque_keys import InvalidKeyError
|
||||
from opaque_keys.edx.keys import CourseKey
|
||||
from rest_condition import C
|
||||
from rest_framework import permissions
|
||||
|
||||
from edx_rest_framework_extensions.permissions import IsStaff, IsUserInUrl
|
||||
@@ -103,7 +102,7 @@ class IsMasterCourseStaffInstructor(permissions.BasePermission):
|
||||
|
||||
class IsUserInUrlOrStaff(permissions.BasePermission):
|
||||
def has_permission(self, request, view):
|
||||
return C(IsStaff) | IsUserInUrl
|
||||
return IsStaff | IsUserInUrl
|
||||
|
||||
|
||||
class IsStaffOrReadOnly(permissions.BasePermission):
|
||||
|
||||
Reference in New Issue
Block a user