2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-08-14 23:51:08 +00:00

Separated category from part permissions and location from stock item permissions

This commit is contained in:
eeintech
2021-01-13 13:35:49 -05:00
parent eedd8059d8
commit 59c0a50289
7 changed files with 43 additions and 26 deletions

View File

@@ -9,7 +9,7 @@
{% if category %}
<h3>
{{ category.name }}
{% if user.is_staff and roles.part.change %}
{% if user.is_staff and roles.part_category.change %}
<a href="{% url 'admin:part_partcategory_change' category.pk %}"><span title="{% trans 'Admin view' %}" class='fas fa-user-shield'></span></a>
{% endif %}
</h3>
@@ -20,18 +20,18 @@
{% endif %}
<p>
<div class='btn-group action-buttons'>
{% if roles.part.add %}
{% if roles.part_category.add %}
<button class='btn btn-default' id='cat-create' title='{% trans "Create new part category" %}'>
<span class='fas fa-plus-circle icon-green'/>
</button>
{% endif %}
{% if category %}
{% if roles.part.change %}
{% if roles.part_category.change %}
<button class='btn btn-default' id='cat-edit' title='{% trans "Edit part category" %}'>
<span class='fas fa-edit icon-blue'/>
</button>
{% endif %}
{% if roles.part.delete %}
{% if roles.part_category.delete %}
<button class='btn btn-default' id='cat-delete' title='{% trans "Delete part category" %}'>
<span class='fas fa-trash-alt icon-red'/>
</button>