Hide edit link on users email when user is not staff

This commit is contained in:
Yohan Boniface 2019-03-24 21:41:51 +01:00
parent 1ee0b20bca
commit 24d278f04d

View file

@ -12,7 +12,13 @@
<th class="price">Prix</th> <th class="price">Prix</th>
<th class="amount">Total</th> <th class="amount">Total</th>
{% for email, order in delivery.orders.items() %} {% for email, order in delivery.orders.items() %}
<th class="person"><a href="/livraison/{{ delivery.id }}/commander?email={{ email }}" title="{{ email }}">{{ email }}</a></th> <th class="person">
{% if request.user and request.user.is_staff %}
<a href="/livraison/{{ delivery.id }}/commander?email={{ email }}" title="{{ email }}">{{ email }}</a>
{% else %}
<span title="{{ email }}">{{ email }}</span>
{% endif %}
</th>
{% endfor %} {% endfor %}
</tr> </tr>
{% for product in delivery.products %} {% for product in delivery.products %}