Skip to content

Commit 1905d25

Browse files
committed
Made changes to the can_adopt_draft() logic, to make it possible for a chair of multiple groups to correct the mistake if adoption was made for the wrong group.
- Legacy-Id: 13662
1 parent 0d82d6b commit 1905d25

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

ietf/doc/utils.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,15 @@ def can_adopt_draft(user, doc):
106106
return (doc.stream_id in (None, "irtf")
107107
and doc.group.type_id == "individ")
108108

109+
roles = Role.objects.filter(name__in=("chair", "delegate", "secr"),
110+
group__type__in=("wg", "rg"),
111+
group__state="active",
112+
person__user=user)
113+
role_groups = [ r.group for r in roles ]
114+
109115
return (doc.stream_id in (None, "ietf", "irtf")
110-
and doc.group.type_id == "individ"
111-
and Role.objects.filter(name__in=("chair", "delegate", "secr"),
112-
group__type__in=("wg", "rg"),
113-
group__state="active",
114-
person__user=user).exists())
116+
and (doc.group.type_id == "individ" or doc.group in role_groups)
117+
and roles.exists())
115118

116119
def two_thirds_rule( recused=0 ):
117120
# For standards-track, need positions from 2/3 of the non-recused current IESG.

0 commit comments

Comments
 (0)