diff --git a/hobo/rest_authentication.py b/hobo/rest_authentication.py index e6c9e03..c481fb6 100644 --- a/hobo/rest_authentication.py +++ b/hobo/rest_authentication.py @@ -8,10 +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 -try: - from django.utils.deprecation import CallableTrue -except ImportError: - CallableTrue = True from django.utils.module_loading import import_string try: @@ -22,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, *args, **kwargs): return True @@ -51,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'