misc: make OIDCUser.is_authenticated callable (#42172)
It's still necessary for DRF 3.4.0.
This commit is contained in:
parent
5c2c4fc7de
commit
5de83bff7d
|
@ -17,6 +17,10 @@
|
|||
import inspect
|
||||
|
||||
from django.utils import six
|
||||
try:
|
||||
from django.utils.deprecation import CallableTrue
|
||||
except ImportError:
|
||||
CallableTrue = True
|
||||
|
||||
from authentic2_idp_oidc.models import OIDCClient
|
||||
|
||||
|
@ -46,7 +50,7 @@ class OIDCUser(object):
|
|||
|
||||
@property
|
||||
def is_authenticated(self):
|
||||
return self.authenticated
|
||||
return CallableTrue
|
||||
|
||||
|
||||
class Authentic2Authentication(BasicAuthentication):
|
||||
|
|
3
tox.ini
3
tox.ini
|
@ -79,7 +79,7 @@ deps =
|
|||
oldldap: python-ldap<3
|
||||
py2: django-appconf<1.0.4
|
||||
py2: django-filter<2
|
||||
drf34: djangorestframework>=3.4,<3.5
|
||||
drf34: djangorestframework>=3.4,<3.4.1
|
||||
drf39: djangorestframework>=3.9.2,<3.10
|
||||
commands =
|
||||
py2: ./getlasso.sh
|
||||
|
@ -115,6 +115,7 @@ filterwarnings =
|
|||
ignore:defusedxml.lxml is no longer supported:DeprecationWarning:openpyxl.xml.functions
|
||||
ignore:Using or importing the ABCs from 'collections':DeprecationWarning:django.*
|
||||
ignore:Role QuerySet won't use Meta.ordering::django\..*
|
||||
ignore:Using user.is_authenticated\(\) and user.is_anonymous\(\) as a method is deprecated.::rest_framework\.*
|
||||
# remind us later
|
||||
once:.*staticfiles.*::django\..*
|
||||
junit_family=xunit2
|
||||
|
|
Loading…
Reference in New Issue