From 18fde7c16aa5e6e554b81d2cbe5d1c46a6ca4f13 Mon Sep 17 00:00:00 2001 From: Arona Date: Mon, 25 May 2020 13:36:42 +0100 Subject: [PATCH] FIX: Don't show asset buttons/history for basic users --- assets/templates/asset_detail.html | 2 ++ assets/templates/partials/audit_details.html | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/assets/templates/asset_detail.html b/assets/templates/asset_detail.html index 6ecebcc9..f6d864b7 100644 --- a/assets/templates/asset_detail.html +++ b/assets/templates/asset_detail.html @@ -29,10 +29,12 @@ {% include 'partials/audit_details.html' %} +{% if perms.RIGS.view_asset %}
{% include 'partials/asset_buttons.html' %}
{% include 'partials/last_edited.html' with target="asset_history" id=object.asset_id %}
+{% endif %} {% endblock %} diff --git a/assets/templates/partials/audit_details.html b/assets/templates/partials/audit_details.html index 8edc2d80..cbd66b89 100644 --- a/assets/templates/partials/audit_details.html +++ b/assets/templates/partials/audit_details.html @@ -1,8 +1,8 @@ -
-
+
+
Audit Details
-
-

Audited at {{ object.last_audited_at|default_if_none:'-' }} by {{ object.last_audited_by|default_if_none:'-' }}

+
+

Audited at {{ object.last_audited_at|default_if_none:'-' }} by {{ object.last_audited_by|default_if_none:'-' }}