feat: use django-hijack to switch user accounts

Resolves #74
This commit is contained in:
James Graham
2021-02-08 14:40:37 +00:00
parent f4bd9a0cef
commit 9164ea8a05
5 changed files with 29 additions and 1 deletions

View File

@@ -42,6 +42,13 @@
href="{% url 'password_change' %}?next={{ person.get_absolute_url }}">Change Password</a>
{% endif %}
{% if request.user.is_superuser and person.user %}
<form style="display: inline;" action="/hijack/{{ person.user.pk }}/" method="post">
{% csrf_token %}
<button class="btn btn-warning" type="submit">Hijack {{ person.name }}</button>
</form>
{% endif %}
<hr>
<div id="map" style="height: 800px; width: 100%"></div>