From d4b296c5cf3de993f6ee3885b9dc87db9bb2f7b4 Mon Sep 17 00:00:00 2001 From: Ole Laursen Date: Wed, 23 Nov 2011 17:58:06 +0000 Subject: [PATCH] Fix bug, make sure user is authenticated before trying to see if he's got any roles - Legacy-Id: 3690 --- ietf/ietfworkflows/accounts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ietf/ietfworkflows/accounts.py b/ietf/ietfworkflows/accounts.py index bce1c4fb4..7119bc118 100644 --- a/ietf/ietfworkflows/accounts.py +++ b/ietf/ietfworkflows/accounts.py @@ -89,7 +89,7 @@ def is_authorized_in_draft_streamREDESIGN(user, draft): if draft.group and super(Document, draft).stream.slug == "ietf": group_req |= Q(group=draft.group) - return bool(Role.objects.filter(name__in=("chair", "delegate"), person__user=user).filter(group_req)) + return user.is_authenticated() and bool(Role.objects.filter(name__in=("chair", "delegate"), person__user=user).filter(group_req)) if settings.USE_DB_REDESIGN_PROXY_CLASSES: