We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7565947 commit 9d06ab0Copy full SHA for 9d06ab0
1 file changed
openedx_authz/rest_api/utils.py
@@ -20,13 +20,12 @@ def _decorator(func_or_class):
20
"""
21
Requires either OAuth2 or Session-based authentication.
22
23
- func_or_class.authentication_classes = (
+ func_or_class.authentication_classes = [
24
JwtAuthentication,
25
SessionAuthenticationAllowInactiveUser,
26
- )
27
- func_or_class.permission_classes = ()
+ ]
28
if is_authenticated:
29
- func_or_class.permission_classes += (IsAuthenticated,)
+ func_or_class.permission_classes.insert(0, IsAuthenticated)
30
return func_or_class
31
32
return _decorator
0 commit comments