Skip to content

Commit eb69b9e

Browse files
committed
Improve can_ballot. Fixes ietf-tools#2856. Commit ready for merge.
- Legacy-Id: 17177
1 parent 5773d62 commit eb69b9e

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

ietf/doc/templatetags/ietf_filters.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright The IETF Trust 2007-2019, All Rights Reserved
1+
# Copyright The IETF Trust 2007-2020, All Rights Reserved
22
# -*- coding: utf-8 -*-
33

44

@@ -551,9 +551,9 @@ def can_defer(user,doc):
551551

552552
@register.filter()
553553
def can_ballot(user,doc):
554-
if doc.stream_id == 'ietf' and user.person.role_set.filter(name="ad", group__type="area", group__state="active"):
555-
return True
556-
elif doc.stream_id == 'irtf' and has_role(user,'IRSG Member'):
557-
return True
554+
# Only IRSG memebers (and the secretariat, handled by code separately) can take positions on IRTF documents
555+
# Otherwise, an AD can take a position on anything that has a ballot open
556+
if doc.type_id == 'draft' and doc.stream_id == 'irtf':
557+
return has_role(user,'IRSG Member')
558558
else:
559-
return False
559+
return user.person.role_set.filter(name="ad", group__type="area", group__state="active")

0 commit comments

Comments
 (0)