fix: Allow secretariat to change the state of a dead draft (#6253)

* 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 <rjsparks@nostrum.com>
This commit is contained in:
Paul Selkirk 2023-09-05 13:58:56 -04:00 committed by GitHub
parent fb4002dbbd
commit cd56d43736
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions

View file

@ -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

View file

@ -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 %}
@ -10,6 +10,13 @@
<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">