Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Move 'Staff membbers' and 'Groups' to new section 'Staff management'

akjanik6d8b1618500d
diff --git a/package.json b/package.json
index 35aa2cbd11..39dca62b13 100644
--- a/package.json
+++ b/package.json
@@ -60,7 +60,9 @@
"sass-loader": "^6.0.6",
"webpack": "^3.5.6",
"webpack-bundle-tracker": "0.2.0",
- "webpack-dev-server": "^2.7.1"
+ "webpack-dev-middleware": "^1.12.0",
+ "webpack-dev-server": "^2.9.4",
+ "webpack-hot-middleware": "^2.20.0"
},
"babel": {
"presets": [
diff --git a/saleor/core/permissions.py b/saleor/core/permissions.py
index b0ced75acc..1fad33952f 100644
--- a/saleor/core/permissions.py
+++ b/saleor/core/permissions.py
@@ -17,6 +17,8 @@ MODELS_PERMISSIONS = [
'user.edit_user',
'voucher.view_voucher',
'voucher.edit_voucher',
+ 'group.view_group',
+ 'group.edit_group',
]
diff --git a/saleor/userprofile/models.py b/saleor/userprofile/models.py
index 825dbbc3e3..cbefaf6831 100644
--- a/saleor/userprofile/models.py
+++ b/saleor/userprofile/models.py
@@ -159,7 +159,12 @@ class User(PermissionsMixin, AbstractBaseUser, index.Indexed):
('view_user',
pgettext_lazy('Permission description', 'Can view users')),
('edit_user',
- pgettext_lazy('Permission description', 'Can edit users')))
+ pgettext_lazy('Permission description', 'Can edit users')),
+ ('view_group',
+ pgettext_lazy('Permission description', 'Can view groups')),
+ ('edit_group',
+ pgettext_lazy('Permission description', 'Can edit groups')),
+ )
def get_full_name(self):
return self.email
diff --git a/templates/dashboard/base.html b/templates/dashboard/base.html
index 44e159c96d..1260f0341d 100644
--- a/templates/dashboard/base.html
+++ b/templates/dashboard/base.html
@@ -168,7 +168,7 @@
{% if user.is_superuser %}
<li class="side-nav-section">
<p>
- {% trans "Configuration" context "Dashboard configuration" %}
+ {% trans "Staff management" context "Management section" %}
</p>
<ul>
<li class="{% block menu_staff_class %}{% endblock %}">
@@ -181,6 +181,15 @@
{% trans "Groups" context "Dashboard groups list" %}
</a>
</li>
+ </ul>
+ </li>
+ {% endif %}
+ {% if user.is_superuser %}
+ <li class="side-nav-section">
+ <p>
+ {% trans "Configuration" context "Dashboard configuration" %}
+ </p>
+ <ul>
<li class="{% block menu_product_classes_class %}{% endblock %}">
<a href="{% url 'dashboard:product-class-list' %}">
{% trans "Product types" context "Dashboard product types list" %}