diff --git a/backend/auth.py b/backend/auth.py index bca6c67..93f6f23 100644 --- a/backend/auth.py +++ b/backend/auth.py @@ -9,7 +9,7 @@ def is_superadmin(request): def is_localadmin(request): """Returns True, if the current user is Tenant-level administrator""" user = request.user - return is_superadmin(request) or user.is_localadmin + return is_superadmin(request) or (hasattr(user, "is_localadmin") and user.is_localadmin) def is_authenticated(request):