[FEAT] Allow admins to manage relationships for all Persons

All Persons now have associated Users, meaning Users can be hijacked by admins to manage the relationships for the associated Person.
This commit is contained in:
2023-03-12 15:39:03 +00:00
parent 284132f4cc
commit f8593776c0
4 changed files with 25 additions and 6 deletions

View File

@@ -10,7 +10,11 @@
</ol>
</nav>
<h1>New Person</h1>
{% if request.user.has_person %}
<h1>New Person</h1>
{% else %}
<h1>Create Your Profile</h1>
{% endif %}
<hr>

View File

@@ -73,8 +73,8 @@
{% if request.user.is_superuser and person.user and person.user != request.user %}
<form action="{% url 'hijack:acquire' %}" method="POST">
{% csrf_token %}
<input type="hidden" name="user_pk" value="{{ person.pk }}">
<button class="btn btn-warning" type="submit">Become {{ person.name }}</button>
<input type="hidden" name="user_pk" value="{{ person.user.pk }}">
<button class="btn btn-warning" type="submit">Become {{ person.name }}</button>
<input type="hidden" name="next" value="{{ request.path }}">
</form>
{% endif %}