Skip to content

Commit b22db74

Browse files
committed
Add review and directorates to can_manage_group_type logic. Fixes ietf-tools#3284. Ready for merge.
- Legacy-Id: 19195
1 parent 8cfa4c2 commit b22db74

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

ietf/group/utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ def can_manage_group_type(user, group, type_id=None):
116116
return has_role(user, ('IRTF Chair', 'Secretariat'))
117117
elif type_id == "wg":
118118
return has_role(user, ('Area Director', 'Secretariat'))
119+
elif type_id == "dir" or type_id == "review":
120+
return has_role(user, ('Area Director', 'Secretariat'))
119121
elif type_id == "team":
120122
if group and group.is_decendant_of("ietf"):
121123
return has_role(user, ('Area Director', 'Secretariat'))
@@ -229,7 +231,7 @@ def construct_group_menu_context(request, group, selected, group_type, others):
229231
# actions
230232
actions = []
231233

232-
can_manage = can_manage_group(request.user, group)
234+
can_manage = others['can_manage']
233235
can_edit_group = False # we'll set this further down
234236

235237
if group.features.has_milestones:

0 commit comments

Comments
 (0)