misc: remove compatibility values for is_anonymous/is_authenticated (#41285)

This commit is contained in:
Frédéric Péters 2020-04-01 18:44:30 +02:00
parent 16cd985be2
commit 7fa44cce97
1 changed files with 3 additions and 9 deletions

View File

@ -16,7 +16,6 @@
from django.conf import settings
from django.contrib.auth.models import User
from django.utils.deprecation import CallableFalse, CallableTrue
if 'mellon' in settings.INSTALLED_APPS:
from mellon.models import UserSAMLIdentifier
@ -25,6 +24,9 @@ else:
class ProxiedUser(object):
is_authenticated = True
is_anonymous = False
def __init__(self, name_id):
self.name_id = name_id
self.email = ''
@ -32,14 +34,6 @@ class ProxiedUser(object):
def get_name_id(self):
return self.name_id
@property
def is_authenticated(self):
return CallableTrue
@property
def is_anonymous(self):
return CallableFalse
def get_user_from_name_id(name_id, raise_on_missing=False):
if not UserSAMLIdentifier: