Closes #20492: Disable API token plaintext retrieval

This commit is contained in:
Jeremy Stretch
2025-10-14 14:57:37 -04:00
parent b7cc4c418b
commit 2bebfccf9b
8 changed files with 10 additions and 42 deletions

View File

@@ -20,14 +20,7 @@
{% if object.version == 1 %}
<tr>
<th scope="row">{% trans "Token" %}</th>
<td>
{% if settings.ALLOW_TOKEN_RETRIEVAL %}
<span id="secret" class="font-monospace" data-secret="{{ object.plaintext }}">{{ object.plaintext }}</span>
<button type="button" class="btn btn-primary toggle-secret float-end" data-bs-toggle="button">{% trans "Show Secret" %}</button>
{% else %}
{{ object.partial }}
{% endif %}
</td>
<td>{{ object.partial }}</td>
</tr>
{% else %}
<tr>