From da48a7507334e40adc21aa722756d27980532b02 Mon Sep 17 00:00:00 2001 From: FreneticScribbler Date: Tue, 18 Feb 2020 16:00:33 +0000 Subject: [PATCH] FIX: Hide asset detail buttons for basic users --- assets/templates/partials/asset_buttons.html | 52 ++++++++++---------- 1 file changed, 27 insertions(+), 25 deletions(-) diff --git a/assets/templates/partials/asset_buttons.html b/assets/templates/partials/asset_buttons.html index e9a4e43e..d947e57b 100644 --- a/assets/templates/partials/asset_buttons.html +++ b/assets/templates/partials/asset_buttons.html @@ -1,26 +1,28 @@ -{% if edit and object %} - - - Duplicate -{% elif duplicate %} - - -{% elif create %} - - -{% else %} - -
- Edit - Duplicate - Audit -
-{% endif %} -{% if create or edit or duplicate %} -
- +{% if perms.assets.change_asset %} + {% if edit and object %} + + + Duplicate + {% elif duplicate %} + + + {% elif create %} + + + {% else %} + +
+ Edit + Duplicate + Audit +
+ {% endif %} + {% if create or edit or duplicate %} +
+ + {% endif %} {% endif %}