Skip to content

Commit 0011106

Browse files
committed
Guard against trying to use .is_authenticated() on a plain string. The error condition can occur when an exception has been triggered before the auth middleware has run. Related to ietf-tools#767 and ietf-tools#768.
- Legacy-Id: 4054
1 parent 8c9404e commit 0011106

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

ietf/ietfworkflows/accounts.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ def is_chair_of_stream(user, stream):
5353
def is_chair_of_streamREDESIGN(user, stream):
5454
if is_secretariat(user):
5555
return True
56+
if isinstance(user, basestring):
57+
return False
5658
return user.is_authenticated() and bool(Role.objects.filter(group__acronym=stream.slug, name="chair", person__user=user))
5759

5860

0 commit comments

Comments
 (0)