From ca5168f20367ea87b0b59ffc1dd5b94f8047625e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Wed, 1 Apr 2020 19:50:06 +0200 Subject: [PATCH] misc: remove usage of CallableTrue (#41239) --- hobo/rest_authentication.py | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/hobo/rest_authentication.py b/hobo/rest_authentication.py index 3d2f7bc..288a380 100644 --- a/hobo/rest_authentication.py +++ b/hobo/rest_authentication.py @@ -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'