Fix error 500: anonymous user has no CAS
This commit is contained in:
parent
3b922ec7ca
commit
329264715e
1 changed files with 2 additions and 0 deletions
|
@ -72,6 +72,8 @@ def grantBOcalPrivileges(user):
|
||||||
|
|
||||||
def requireCasUser(fct):
|
def requireCasUser(fct):
|
||||||
def hasCas(user):
|
def hasCas(user):
|
||||||
|
if user.is_anonymous:
|
||||||
|
return False
|
||||||
return CasUser.objects.filter(user=user).count() > 0
|
return CasUser.objects.filter(user=user).count() > 0
|
||||||
|
|
||||||
def wrap(user, *args, **kwargs):
|
def wrap(user, *args, **kwargs):
|
||||||
|
|
Loading…
Reference in a new issue