diff --git a/bocal_auth/rhosts.py b/bocal_auth/rhosts.py index 1b9230e..bd6d9a3 100644 --- a/bocal_auth/rhosts.py +++ b/bocal_auth/rhosts.py @@ -72,6 +72,8 @@ def grantBOcalPrivileges(user): def requireCasUser(fct): def hasCas(user): + if user.is_anonymous: + return False return CasUser.objects.filter(user=user).count() > 0 def wrap(user, *args, **kwargs):