permission added

This commit is contained in:
Matthias 2021-05-18 11:51:08 +02:00
parent 9a42421852
commit 900f707ff9
2 changed files with 3 additions and 0 deletions

View File

@ -30,12 +30,14 @@
</a>
</li>
{% if user.is_staff and roles.part.add %}
<li class='list-group-item {% if tab == "import" %}active{% endif %}' title='{% trans "Import Parts" %}'>
<a href='{% url "part-import" %}'>
<span class='fas fa-file-upload'></span>
{% trans "Import Parts" %}
</a>
</li>
{% endif %}
{% if category %}
<li class='list-group-item {% if tab == "parameters" %}active{% endif %}' title='{% trans "Parameters" %}'>

View File

@ -725,6 +725,7 @@ class PartCreate(AjaxCreateView):
class PartImport(FileManagementFormView):
''' Part: Upload file, match to fields and import parts(using multi-Step form) '''
permission_required = 'part.add'
class MyFileManager(FileManager):
REQUIRED_HEADERS = [