Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Fix permissions in templates
akjanik608645362997
diff --git a/saleor/shipping/models.py b/saleor/shipping/models.pyindex 718f6d9ea2..77433aba5f 100644--- a/saleor/shipping/models.py+++ b/saleor/shipping/models.py@@ -94,12 +94,8 @@ class ShippingMethodCountry(models.Model):shipping_method = models.ForeignKey(ShippingMethod, related_name='price_per_country',verbose_name=pgettext_lazy(-<<<<<<< HEAD'Shipping method country field', 'shipping method'),on_delete=models.CASCADE)-=======- 'Shipping method country field', 'shipping method'),)->>>>>>> Code styleobjects = ShippingMethodCountryQueryset.as_manager()diff --git a/templates/dashboard/group/list.html b/templates/dashboard/group/list.htmlindex 1fbe52608b..3d81bf9ecc 100644--- a/templates/dashboard/group/list.html+++ b/templates/dashboard/group/list.html@@ -48,7 +48,7 @@</thead><tbody>{% for group in groups %}- <tr data-action-go="{% if perms.discount.edit_group %}{% url 'dashboard:group-details' pk=group.name.pk %}{% endif %}">+ <tr data-action-go="{% if perms.userprofile.edit_group %}{% url 'dashboard:group-details' pk=group.name.pk %}{% endif %}"><td>{{ group.name }}</td>diff --git a/templates/dashboard/product/product_class/list.html b/templates/dashboard/product/product_class/list.htmlindex 1b139f1b44..eaaaebe871 100644--- a/templates/dashboard/product/product_class/list.html+++ b/templates/dashboard/product/product_class/list.html@@ -49,7 +49,7 @@</thead><tbody>{% for pk, name, has_variants, product_attributes, variant_attributes in product_classes %}- <tr data-action-go="{% if perms.discount.edit_properties %}{% url 'dashboard:product-class-update' pk=pk %}{% endif %}">+ <tr data-action-go="{% if perms.product.edit_properties %}{% url 'dashboard:product-class-update' pk=pk %}{% endif %}"><td>{{ name }}</td>diff --git a/templates/dashboard/shipping/list.html b/templates/dashboard/shipping/list.htmlindex 92a1a69555..c0c52d3ef2 100644--- a/templates/dashboard/shipping/list.html+++ b/templates/dashboard/shipping/list.html@@ -52,7 +52,7 @@</thead><tbody>{% for method in shipping_methods %}- <tr data-action-go="{% if perms.discount.edit_staff %}{% url 'dashboard:shipping-method-detail' pk=method.pk %}{% endif %}">+ <tr data-action-go="{% if perms.shipping.edit_shipping %}{% url 'dashboard:shipping-method-detail' pk=method.pk %}{% endif %}"><td>{{ method }}</td>diff --git a/templates/dashboard/staff/list.html b/templates/dashboard/staff/list.htmlindex b8b12a1ffd..ea398b1321 100644--- a/templates/dashboard/staff/list.html+++ b/templates/dashboard/staff/list.html@@ -50,7 +50,7 @@</thead><tbody>{% for user in staff %}- <tr data-action-go="{% if perms.discount.edit_staff %}{% url "dashboard:staff-details" pk=user.pk %}{% endif %}">+ <tr data-action-go="{% if perms.userprofile.edit_staff %}{% url "dashboard:staff-details" pk=user.pk %}{% endif %}">{% with user.default_billing_address as default_address %}<td>{{ user.email }}