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:
@@ -12,7 +12,6 @@ from edx_rest_framework_extensions.permissions import (
|
||||
JwtRestrictedApplication,
|
||||
NotJwtRestrictedApplication
|
||||
)
|
||||
from rest_condition import C
|
||||
from rest_framework.permissions import BasePermission
|
||||
|
||||
from openedx.core.lib.api.permissions import ApiKeyHeaderPermission
|
||||
@@ -51,11 +50,11 @@ class JwtHasTpaProviderFilterForRequestedProvider(BasePermission):
|
||||
|
||||
# TODO: Remove ApiKeyHeaderPermission. Check deprecated_api_key_header custom attribute for active usage.
|
||||
_NOT_JWT_RESTRICTED_TPA_PERMISSIONS = (
|
||||
C(NotJwtRestrictedApplication) &
|
||||
(C(IsSuperuser) | ApiKeyHeaderPermission | C(IsStaff)) # pylint: disable=unsupported-binary-operation
|
||||
NotJwtRestrictedApplication &
|
||||
(IsSuperuser | ApiKeyHeaderPermission | IsStaff) # pylint: disable=unsupported-binary-operation
|
||||
)
|
||||
_JWT_RESTRICTED_TPA_PERMISSIONS = (
|
||||
C(JwtRestrictedApplication) &
|
||||
JwtRestrictedApplication &
|
||||
JwtHasScope &
|
||||
JwtHasTpaProviderFilterForRequestedProvider
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user