From 3e9c7cda21dd37352039ae8a701b5292f3e6140d Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Mon, 5 Oct 2020 23:11:55 +1100 Subject: [PATCH] Change what elements the user can see on the index page, based on permissions! --- InvenTree/templates/InvenTree/index.html | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/InvenTree/templates/InvenTree/index.html b/InvenTree/templates/InvenTree/index.html index b0c2d0ae02..a9e4ae92ea 100644 --- a/InvenTree/templates/InvenTree/index.html +++ b/InvenTree/templates/InvenTree/index.html @@ -9,18 +9,26 @@ InvenTree | Index
+ {% if perms.part.view_part %} {% include "InvenTree/latest_parts.html" with collapse_id="latest_parts" %} {% include "InvenTree/bom_invalid.html" with collapse_id="bom_invalid" %} - {% include "InvenTree/low_stock.html" with collapse_id="order" %} - {% include "InvenTree/po_outstanding.html" with collapse_id="po_outstanding" %} - + {% include "InvenTree/starred_parts.html" with collapse_id="starred" %} + {% endif %} + {% if perms.build.view_build %} + {% include "InvenTree/build_pending.html" with collapse_id="build_pending" %} + {% endif %}
- {% include "InvenTree/starred_parts.html" with collapse_id="starred" %} - {% include "InvenTree/build_pending.html" with collapse_id="build_pending" %} + {% if perms.stock.view_stockitem %} + {% include "InvenTree/low_stock.html" with collapse_id="order" %} {% include "InvenTree/required_stock_build.html" with collapse_id="stock_to_build" %} + {% endif %} + {% if perms.order.view_purchaseorder %} + {% include "InvenTree/po_outstanding.html" with collapse_id="po_outstanding" %} + {% endif %} + {% if perms.order.view_salesorder %} {% include "InvenTree/so_outstanding.html" with collapse_id="so_outstanding" %} - + {% endif %}
{% endblock %}