misc: remove usage of CallableTrue (#41239)
This commit is contained in:
parent
c3c35de94b
commit
ca5168f203
|
@ -8,7 +8,6 @@ from django.contrib.auth import get_user_model
|
|||
from django.conf import settings
|
||||
from django.contrib.auth.models import AnonymousUser
|
||||
from django.db.models.fields import FieldDoesNotExist
|
||||
from django.utils.deprecation import CallableTrue
|
||||
from django.utils.module_loading import import_string
|
||||
|
||||
try:
|
||||
|
@ -19,14 +18,8 @@ except ImportError:
|
|||
|
||||
class AnonymousAuthenticServiceUser(AnonymousUser):
|
||||
'''This virtual user hold permissions for other publik services'''
|
||||
|
||||
@property
|
||||
def is_anonymous(self):
|
||||
return CallableTrue
|
||||
|
||||
@property
|
||||
def is_authenticated(self):
|
||||
return CallableTrue
|
||||
is_anonymous = True
|
||||
is_authenticated = True
|
||||
|
||||
def has_perm(self, perm_or_perms, obj=None):
|
||||
return True
|
||||
|
@ -48,14 +41,8 @@ class AnonymousAuthenticServiceUser(AnonymousUser):
|
|||
class AnonymousAdminServiceUser(AnonymousUser):
|
||||
'''This virtual user hold permissions for other publik services'''
|
||||
is_staff = True
|
||||
|
||||
@property
|
||||
def is_anonymous(self):
|
||||
return CallableTrue
|
||||
|
||||
@property
|
||||
def is_authenticated(self):
|
||||
return CallableTrue
|
||||
is_anonymous = True
|
||||
is_authenticated = True
|
||||
|
||||
def __unicode__(self):
|
||||
return 'Publik Service Admin'
|
||||
|
|
Loading…
Reference in New Issue