From abbddefa4001ea285e095dce5ddd6cedad0f41ce Mon Sep 17 00:00:00 2001 From: Nathaniel Hammond Date: Wed, 21 Aug 2024 15:04:53 +0100 Subject: [PATCH] #3639 update catalog pricing permission typos --- CHANGELOG.md | 1 + src/templates/store-management/pricing-rules/index.twig | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 652f223606..f7786fc0f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - Fixed a bug where variants’ `promotionalPrices` weren’t showing as currency values on variant indexes. - Fixed a PHP error that could occur when sending an order email. ([#3596](https://github.com/craftcms/commerce/issues/3596)) - Fixed a bug where dimension fields were not displaying values in the correct formatting locale. ([#3636](https://github.com/craftcms/commerce/issues/3636)) +- Fixed a bug where users couldn’t access catalog pricing rules even if the current user had permission. ([#3639](https://github.com/craftcms/commerce/issues/3639)) ## 5.0.16.2 - 2024-08-16 diff --git a/src/templates/store-management/pricing-rules/index.twig b/src/templates/store-management/pricing-rules/index.twig index 4239af8488..de5136b733 100644 --- a/src/templates/store-management/pricing-rules/index.twig +++ b/src/templates/store-management/pricing-rules/index.twig @@ -16,7 +16,7 @@ ]) %} {% block actionButton %} - {% if currentUser.can('commerce-createPricingCatalogRules') %} + {% if currentUser.can('commerce-createCatalogPricingRules') %} {{ 'New catalog pricing rule'|t('commerce') }} {% endif %} {% endblock %} @@ -57,7 +57,7 @@ {% js %} var actions = [ - {% if currentUser.can('commerce-editPricingCatalogRules') %} + {% if currentUser.can('commerce-editCatalogPricingRules') %} { label: Craft.t('commerce', 'Set status'), actions: [ @@ -78,7 +78,7 @@ var actions = [ ] }, {% endif %} - {% if currentUser.can('commerce-deletePricingCatalogRules') %} + {% if currentUser.can('commerce-deleteCatalogPricingRules') %} { label: Craft.t('commerce', 'Delete'), action: 'commerce/catalog-pricing-rules/delete', @@ -106,7 +106,7 @@ new Craft.VueAdminTable({ columns: columns, fullPane: false, container: '#pcr-vue-admin-table', - deleteAction: {{ currentUser.can('commerce-deletePricingCatalogRules')? '"commerce/catalog-pricing-rules/delete"' : 'null' }}, + deleteAction: {{ currentUser.can('commerce-deleteCatalogPricingRules')? '"commerce/catalog-pricing-rules/delete"' : 'null' }}, emptyMessage: Craft.t('commerce', 'No catalog pricing rules exist yet.'), padded: true, tableData: {{ tableData|json_encode|raw }}