Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Add permission check in template
michal85fb3e744e81
diff --git a/templates/dashboard/customer/detail.html b/templates/dashboard/customer/detail.htmlindex 3a7bb224f7..e6723be6a7 100644--- a/templates/dashboard/customer/detail.html+++ b/templates/dashboard/customer/detail.html@@ -91,28 +91,29 @@{% endif %}</div></div>+<div class="col s12 l4">- <div class="row">- <div class="col s12 m6 p6 l12">- <div class="card equal-height-on-med">- <div class="card-content">- <span class="card-title black-text">- {% trans "Promote to staff member" context "Customer promote to staff member card title" %}- </span>- <form method="post">- {% csrf_token %}- {{ form|materializecss }}- <div class="card-action right-align">- <button type="submit" class="btn waves-effect waves-light">- {% trans 'Update' context 'Dashboard update action' %}- </button>- </div>- </form>+ <div class="row">+ {% if user.is_superuser %}+ <div class="col s12 m6 p6 l12">+ <div class="card equal-height-on-med">+ <div class="card-content">+ <span class="card-title black-text">+ {% trans "Promote to staff member" context "Customer promote to staff member card title" %}+ </span>+ <form method="post">+ {% csrf_token %}+ {{ form|materializecss }}+ <div class="card-action right-align">+ <button type="submit" class="btn waves-effect waves-light">+ {% trans 'Update' context 'Dashboard update action' %}+ </button>+ </div>+ </form>+ </div></div></div>- </div>- </div>- <div class="row">+ {% endif %}<div class="col s12 m6 p6 l12"><div class="card equal-height-on-med"><div class="card-content">