Merged [7590] from rjsparks@nostrum.com: Change when the consensus field is displayed and who can edit it for IETF stream documents. Fixes bug #1380.

- Legacy-Id: 7612
Note: SVN reference [7590] has been migrated to Git commit 85458abee3a1474ba9fc476c087e08e24a62cb2e
This commit is contained in:
Henrik Levkowetz 2014-04-16 19:02:25 +00:00
parent 1d9e9e7745
commit fc0c605f5b
2 changed files with 12 additions and 2 deletions

View file

@ -262,9 +262,18 @@ def document_main(request, name, rev=None):
can_edit_stream_info = is_authorized_in_doc_stream(request.user, doc)
can_edit_shepherd_writeup = can_edit_stream_info or user_is_person(request.user, doc.shepherd) or has_role(request.user, ["Area Director"])
can_edit_consensus = False
consensus = None
if doc.stream_id in ("ietf", "irtf", "iab"):
if doc.stream_id == "ietf" and iesg_state:
show_in_states = set(IESG_BALLOT_ACTIVE_STATES)
show_in_states.update(('approved','ann','rfcqueue','pub'))
if iesg_state.slug in show_in_states:
can_edit_consensus = can_edit
e = doc.latest_event(ConsensusDocEvent, type="changed_consensus")
consensus = nice_consensus(e and e.consensus)
elif doc.stream_id in ("irtf", "iab"):
can_edit_consensus = can_edit or can_edit_stream_info
e = doc.latest_event(ConsensusDocEvent, type="changed_consensus")
consensus = nice_consensus(e and e.consensus)
@ -339,6 +348,7 @@ def document_main(request, name, rev=None):
can_edit_stream_info=can_edit_stream_info,
can_edit_shepherd_writeup=can_edit_shepherd_writeup,
can_edit_iana_state=can_edit_iana_state,
can_edit_consensus=can_edit_consensus,
rfc_number=rfc_number,
draft_name=draft_name,

View file

@ -121,7 +121,7 @@
<tr>
<td>Consensus:</td>
<td>
<a title="Whether the document is the result of a community consensus process as defined in RFC 5741" {% if can_edit or can_edit_stream_info %}class="editlink" href="{% url "doc_edit_consensus" name=doc.name %}"{% endif %}>
<a title="Whether the document is the result of a community consensus process as defined in RFC 5741" {% if can_edit_consensus %}class="editlink" href="{% url "doc_edit_consensus" name=doc.name %}"{% endif %}>
{{ consensus }}
</a>
</td>