@@ -280,8 +280,9 @@ def document_main(request, name, rev=None):
280280
281281 shepherd_writeup = doc .latest_event (WriteupDocEvent , type = "changed_protocol_writeup" )
282282
283+ is_shepherd = user_is_person (request .user , doc .shepherd and doc .shepherd .person )
283284 can_edit_stream_info = is_authorized_in_doc_stream (request .user , doc )
284- can_edit_shepherd_writeup = can_edit_stream_info or user_is_person ( request . user , doc . shepherd and doc . shepherd . person ) or has_role (request .user , ["Area Director" ])
285+ can_edit_shepherd_writeup = can_edit_stream_info or is_shepherd or has_role (request .user , ["Area Director" ])
285286 can_edit_notify = can_edit_shepherd_writeup
286287 can_edit_individual = is_individual_draft_author (request .user , doc )
287288
@@ -354,7 +355,7 @@ def document_main(request, name, rev=None):
354355 if doc .get_state_slug () not in ["rfc" , "expired" ] and doc .stream_id in ("ietf" ,) and not snapshot :
355356 if not iesg_state and can_edit :
356357 actions .append (("Begin IESG Processing" , urlreverse ('ietf.doc.views_draft.edit_info' , kwargs = dict (name = doc .name )) + "?new=1" ))
357- elif can_edit_stream_info and (not iesg_state or iesg_state .slug == 'watching' ):
358+ elif ( can_edit_stream_info or is_shepherd ) and (not iesg_state or iesg_state .slug == 'watching' ):
358359 actions .append (("Submit to IESG for Publication" , urlreverse ('ietf.doc.views_draft.to_iesg' , kwargs = dict (name = doc .name ))))
359360
360361 augment_docs_with_tracking_info ([doc ], request .user )
@@ -384,7 +385,7 @@ def document_main(request, name, rev=None):
384385 can_change_stream = can_change_stream ,
385386 can_edit_stream_info = can_edit_stream_info ,
386387 can_edit_individual = can_edit_individual ,
387- is_shepherd = user_is_person ( request . user , doc . shepherd and doc . shepherd . person ) ,
388+ is_shepherd = is_shepherd ,
388389 can_edit_shepherd_writeup = can_edit_shepherd_writeup ,
389390 can_edit_notify = can_edit_notify ,
390391 can_edit_iana_state = can_edit_iana_state ,
0 commit comments