From 24d278f04d1485830d6586d2e0fd7c6495593f3d Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Sun, 24 Mar 2019 21:41:51 +0100 Subject: [PATCH] Hide edit link on users email when user is not staff --- copanier/templates/delivery.html | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/copanier/templates/delivery.html b/copanier/templates/delivery.html index 2d41ea4..06cfd05 100644 --- a/copanier/templates/delivery.html +++ b/copanier/templates/delivery.html @@ -12,7 +12,13 @@ Prix Total {% for email, order in delivery.orders.items() %} - {{ email }} + + {% if request.user and request.user.is_staff %} + {{ email }} + {% else %} + {{ email }} + {% endif %} + {% endfor %} {% for product in delivery.products %}