Skip to content

Commit

Permalink
fix: Allow secretariat to change the state of a dead draft (#6253)
Browse files Browse the repository at this point in the history
* fix: Allow secretariat to change the state of a dead draft (#6051)

* refactor: Move the secretariat-can-edit-dead-state enablement to the template to limit side-effects.

* style: Correct whitespace to fully revert file

---------

Co-authored-by: Robert Sparks <[email protected]>
  • Loading branch information
pselkirk and rjsparks authored Sep 5, 2023
1 parent fb4002d commit cd56d43
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ietf/templates/doc/document_draft.html
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@
</a>
</th>
<td class="edit">
{% if iesg_state.slug != 'idexists' and iesg_state.slug != 'dead' and can_edit %}
{% if iesg_state.slug != 'idexists' and iesg_state.slug != 'dead' and can_edit or user|has_role:"Secretariat" %}
<a class="btn btn-primary btn-sm"
href="{% url 'ietf.doc.views_draft.change_state' name=doc.name %}">
Edit
Expand Down
9 changes: 8 additions & 1 deletion ietf/templates/doc/draft/change_state.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% extends "base.html" %}
{# Copyright The IETF Trust 2015, All Rights Reserved #}
{# Copyright The IETF Trust 2015-2023, All Rights Reserved #}
{% load origin %}
{% load django_bootstrap5 %}
{% block title %}Change state for {{ doc }}{% endblock %}
Expand All @@ -10,6 +10,13 @@ <h1>
<br>
<small class="text-body-secondary">{{ doc }}</small>
</h1>
{% if state.slug == "dead" %}
<p class="alert alert-warning my-3">
This document is in IESG state "Dead". It is unusual to change
this to anything other than "AD is watching", and this should
never be used as a replacement for Begin IESG Processing.
</p>
{% endif %}
<a class="btn btn-info my-3"
href="{% url 'ietf.doc.views_help.state_help' type="draft-iesg" %}">Help on states</a>
<form class="mt-3" method="post">
Expand Down

0 comments on commit cd56d43

Please sign in to comment.