Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Allow to see staff section only to users with right permissions
akjanik83310eeb0cac
diff --git a/saleor/core/permissions.py b/saleor/core/permissions.pyindex 680e348544..f849fdb5ed 100644--- a/saleor/core/permissions.py+++ b/saleor/core/permissions.py@@ -19,6 +19,7 @@ MODELS_PERMISSIONS = ['voucher.edit_voucher','user.view_group','user.edit_group',+ 'user.view_staff',]diff --git a/templates/dashboard/base.html b/templates/dashboard/base.htmlindex 0ae4846975..c79a799ef5 100644--- a/templates/dashboard/base.html+++ b/templates/dashboard/base.html@@ -165,20 +165,20 @@</ul></li>{% endif %}- {% if perms.userprofile.view_group %}+ {% if perms.userprofile.view_group or perms.userprofile.edit_group %}<li class="side-nav-section"><p>{% trans "Staff management" context "Management section" %}</p><ul>- {% if perms.userprofile.edit_group %}+ {% if perms.userprofile.view_staff %}<li class="{% block menu_staff_class %}{% endblock %}"><a href="{% url 'dashboard:staff-list' %}">{% trans "Staff members" context "Dashboard staff members list" %}</a></li>{% endif %}- {% if perms.userprofile.edit_group %}+ {% if perms.userprofile.view_group %}<li class="{% block menu_groups_class %}{% endblock %}"><a href="{% url 'dashboard:group-list' %}">{% trans "Groups" context "Dashboard groups list" %}@@ -193,7 +193,7 @@<p>{% trans "Configuration" context "Dashboard configuration" %}</p>- <ul>+ <ul><li class="{% block menu_product_classes_class %}{% endblock %}"><a href="{% url 'dashboard:product-class-list' %}">{% trans "Product types" context "Dashboard product types list" %}