Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Restrict dashboard styleguide access to staff
Marcin Gębalac05975237820
diff --git a/saleor/dashboard/views.py b/saleor/dashboard/views.pyindex 531478c172..e241bd2b80 100644--- a/saleor/dashboard/views.py+++ b/saleor/dashboard/views.py@@ -29,6 +29,8 @@ def index(request):'low_stock': low_stock}return TemplateResponse(request, 'dashboard/index.html', ctx)++@staff_member_requireddef styleguide(request):return TemplateResponse(request, 'dashboard/styleguide/index.html', {})diff --git a/templates/dashboard/base.html b/templates/dashboard/base.htmlindex ff8469e6a1..24417746a1 100644--- a/templates/dashboard/base.html+++ b/templates/dashboard/base.html@@ -37,6 +37,9 @@<a href="/" target="_blank" class="waves-effect waves-teal">{% trans "Visit storefront" context "Dashboard top navigation action" %}</a>+ <a href="{% url "dashboard:styleguide" %}" target="_blank" class="waves-effect waves-teal">+ {% trans "Style guide" context "Dashboard top navigation action" %}+ </a></li><li><a href="{% url 'account_logout' %}" class="waves-effect waves-teal">