From 36868ebb4c9b3a17d37683f71151d0cbf0f9ffe6 Mon Sep 17 00:00:00 2001 From: Oliver Date: Sat, 18 Jun 2022 14:49:46 +1000 Subject: [PATCH] Hide buttons for users without required permissions (#3219) --- InvenTree/build/templates/build/detail.html | 8 ++++++-- InvenTree/part/templates/part/detail.html | 2 ++ InvenTree/stock/templates/stock/item.html | 2 ++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/InvenTree/build/templates/build/detail.html b/InvenTree/build/templates/build/detail.html index 248fcec580..f9bac157a8 100644 --- a/InvenTree/build/templates/build/detail.html +++ b/InvenTree/build/templates/build/detail.html @@ -172,7 +172,7 @@

{% trans "Allocate Stock to Build" %}

{% include "spacer.html" %}
- {% if build.active and build.has_untracked_bom_items %} + {% if roles.build.add and build.active and build.has_untracked_bom_items %} @@ -229,7 +229,7 @@

{% trans "Incomplete Build Outputs" %}

{% include "spacer.html" %}
- {% if build.active %} + {% if roles.build.add and build.active %} @@ -249,12 +249,16 @@
diff --git a/InvenTree/part/templates/part/detail.html b/InvenTree/part/templates/part/detail.html index 3705ad929c..10ec44489a 100644 --- a/InvenTree/part/templates/part/detail.html +++ b/InvenTree/part/templates/part/detail.html @@ -20,9 +20,11 @@

{% trans "Part Stock" %}

{% include "spacer.html" %}
+ {% if roles.stock.add %} + {% endif %}
diff --git a/InvenTree/stock/templates/stock/item.html b/InvenTree/stock/templates/stock/item.html index d5ccc21d35..52fbab79b4 100644 --- a/InvenTree/stock/templates/stock/item.html +++ b/InvenTree/stock/templates/stock/item.html @@ -147,9 +147,11 @@

{% trans "Installed Stock Items" %}

{% include "spacer.html" %}
+ {% if roles.stock.add %} + {% endif %}