fix: Hide person details from non-admin users

See #35
This commit is contained in:
James Graham
2020-06-25 11:38:26 +01:00
parent aafb6c0a21
commit 0e4234cb35

View File

@@ -14,6 +14,14 @@
<hr>
{% if person.user == request.user or request.user.is_superuser %}
{% if person.user != request.user and request.user.is_superuser %}
<div class="alert alert-warning">
<strong>NB:</strong> You are able to see the details of this person because you are an admin.
Regular users are not able to see this information for people other than themselves.
</div>
{% endif %}
<dl>
{% if person.gender %}
<dt>Gender</dt>
@@ -69,6 +77,7 @@
</dd>
{% endif %}
</dl>
{% endif %}
<a class="btn btn-success"
href="{% url 'people:person.update' pk=person.pk %}">Update</a>