Skip to content

Commit 7635d8d

Browse files
committed
Fixed a bug in calculating can_edit_shepherd_writeup, triggered by the change in what Document.shepherd refers to (now, Email, used to be Person).
- Legacy-Id: 8510
1 parent 1bf4356 commit 7635d8d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

ietf/doc/views_draft.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -877,7 +877,9 @@ def edit_shepherd_writeup(request, name):
877877
doc = get_object_or_404(Document, type="draft", name=name)
878878

879879
can_edit_stream_info = is_authorized_in_doc_stream(request.user, doc)
880-
can_edit_shepherd_writeup = can_edit_stream_info or user_is_person(request.user, doc.shepherd) or has_role(request.user, ["Area Director"])
880+
can_edit_shepherd_writeup = ( can_edit_stream_info
881+
or (doc.shepherd and user_is_person(request.user, doc.shepherd.person))
882+
or has_role(request.user, ["Area Director"]))
881883

882884
if not can_edit_shepherd_writeup:
883885
return HttpResponseForbidden("You do not have the necessary permissions to view this page")

0 commit comments

Comments
 (0)