From ab454e5ba4fdac8567ef2f7656fb60120f20a205 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Tue, 6 Oct 2020 16:46:13 +1100 Subject: [PATCH] More template changes: perms -> roles --- InvenTree/build/templates/build/build_base.html | 2 +- InvenTree/company/templates/company/company_base.html | 2 +- InvenTree/order/templates/order/order_base.html | 2 +- InvenTree/order/templates/order/sales_order_base.html | 2 +- InvenTree/part/templates/part/part_base.html | 4 ++-- InvenTree/part/templates/part/tabs.html | 4 ++-- InvenTree/stock/templates/stock/item_base.html | 2 +- InvenTree/stock/templates/stock/location.html | 2 +- InvenTree/templates/slide.html | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/InvenTree/build/templates/build/build_base.html b/InvenTree/build/templates/build/build_base.html index 915433b055..ed3da576d5 100644 --- a/InvenTree/build/templates/build/build_base.html +++ b/InvenTree/build/templates/build/build_base.html @@ -35,7 +35,7 @@ src="{% static 'img/blank_image.png' %}"

{{ build.quantity }} x {{ build.part.full_name }} - {% if user.is_staff and perms.build.change_build %} + {% if user.is_staff and roles.build.change %} {% endif %}

diff --git a/InvenTree/company/templates/company/company_base.html b/InvenTree/company/templates/company/company_base.html index 73ebecf979..f20107277d 100644 --- a/InvenTree/company/templates/company/company_base.html +++ b/InvenTree/company/templates/company/company_base.html @@ -23,7 +23,7 @@ InvenTree | {% trans "Company" %} - {{ company.name }}

{{ company.name }} - {% if user.is_staff and perms.company.change_company %} + {% if user.is_staff and roles.company.change %} {% endif %}

diff --git a/InvenTree/order/templates/order/order_base.html b/InvenTree/order/templates/order/order_base.html index 036021b12d..71e3455722 100644 --- a/InvenTree/order/templates/order/order_base.html +++ b/InvenTree/order/templates/order/order_base.html @@ -24,7 +24,7 @@ src="{% static 'img/blank_image.png' %}"

{{ order }} - {% if user.is_staff and perms.order.change_purchaseorder %} + {% if user.is_staff and roles.purchase_order.change %} {% endif %}

diff --git a/InvenTree/order/templates/order/sales_order_base.html b/InvenTree/order/templates/order/sales_order_base.html index 70505ddccc..0572104e09 100644 --- a/InvenTree/order/templates/order/sales_order_base.html +++ b/InvenTree/order/templates/order/sales_order_base.html @@ -34,7 +34,7 @@ src="{% static 'img/blank_image.png' %}"

{{ order }} - {% if user.is_staff and perms.order.change_salesorder %} + {% if user.is_staff and roles.sales_order.change %} {% endif %}

diff --git a/InvenTree/part/templates/part/part_base.html b/InvenTree/part/templates/part/part_base.html index 750f3f3806..d7604deae4 100644 --- a/InvenTree/part/templates/part/part_base.html +++ b/InvenTree/part/templates/part/part_base.html @@ -28,7 +28,7 @@

{{ part.full_name }} - {% if user.is_staff and perms.part.change_part %} + {% if user.is_staff and roles.part.change %} {% endif %} {% if not part.active %} @@ -315,7 +315,7 @@ }); {% endif %} - {% if not part.active and perms.part.delete_part %} + {% if not part.active and roles.part.delete %} $("#part-delete").click(function() { launchModalForm( "{% url 'part-delete' part.id %}", diff --git a/InvenTree/part/templates/part/tabs.html b/InvenTree/part/templates/part/tabs.html index e36675eeab..8322a225bc 100644 --- a/InvenTree/part/templates/part/tabs.html +++ b/InvenTree/part/templates/part/tabs.html @@ -36,7 +36,7 @@ {% trans "Used In" %} {% if part.used_in_count > 0 %}{{ part.used_in_count }}{% endif %} {% endif %} - {% if part.purchaseable and perms.order.view_purchaseorder %} + {% if part.purchaseable and roles.purchase_order.view %} {% if part.is_template == False %} {% trans "Suppliers" %} @@ -48,7 +48,7 @@ {% trans "Purchase Orders" %} {{ part.purchase_orders|length }} {% endif %} - {% if part.salable and perms.order.view_salesorder %} + {% if part.salable and roles.sales_order.view %}
  • {% trans "Sale Price" %}
  • diff --git a/InvenTree/stock/templates/stock/item_base.html b/InvenTree/stock/templates/stock/item_base.html index b3fb9af743..928aa6b7a1 100644 --- a/InvenTree/stock/templates/stock/item_base.html +++ b/InvenTree/stock/templates/stock/item_base.html @@ -65,7 +65,7 @@ InvenTree | {% trans "Stock Item" %} - {{ item }} {% else %} {{ item.part.full_name }} × {% decimal item.quantity %} {% endif %} -{% if user.is_staff and perms.stock.change_stockitem %} +{% if user.is_staff and roles.stock.change %} {% endif %}

    diff --git a/InvenTree/stock/templates/stock/location.html b/InvenTree/stock/templates/stock/location.html index 2f319f4925..d411891078 100644 --- a/InvenTree/stock/templates/stock/location.html +++ b/InvenTree/stock/templates/stock/location.html @@ -8,7 +8,7 @@ {% if location %}

    {{ location.name }} - {% if user.is_staff and perms.stock.change_stocklocation %} + {% if user.is_staff and roles.stock.change %} {% endif %}

    diff --git a/InvenTree/templates/slide.html b/InvenTree/templates/slide.html index 45535786c9..edd39e75a2 100644 --- a/InvenTree/templates/slide.html +++ b/InvenTree/templates/slide.html @@ -1,3 +1,3 @@
    - +
    \ No newline at end of file