Add API token management: implement APIToken model, views, and templates for creating and revoking tokens

This commit is contained in:
Ross
2026-02-23 11:57:57 +00:00
parent 83d1b48213
commit d7f3ebf950
8 changed files with 309 additions and 17 deletions
+3
View File
@@ -90,6 +90,9 @@
<a class="btn btn-outline-secondary d-block mb-2" href="{% url 'account_update' user.username %}">Update user details</a>
{% endif %}
<a class="btn btn-primary d-block mb-2" href="{% url 'account_profile_update' user.username %}">Edit profile</a>
{% if request.user == user %}
<a class="btn btn-outline-secondary d-block mb-2" href="{% url 'atlas:api_tokens' %}">API tokens</a>
{% endif %}
{% if request.user.is_superuser %}
<a class="btn btn-outline-danger d-block" href="{% url 'admin:auth_user_change' user.pk %}" target="_blank" rel="noopener">Admin edit</a>
{% endif %}