QUALITY PATCH

ACSD-57570: A restricted admin user with access to a particular store cannot always see all shared…

A restricted admin user with access to a particular store cannot always see all shared catalogs or save customers, leading to inconsistencies. Quality patch ACSD-57570 for magento/module-shared-catalog applies to Magento Open Source and Adobe Commerce 2.4.4 to 2.4.7-p2.

Categories
B2B, Admin
Components
magento/module-shared-catalog, magento/module-admin-gws, magento/module-support, magento/module-customer, magento/module-user
Origin
adobe-commerce-support
Since QPT
1.1.57

Issue

A restricted admin user with access to a particular store cannot always see all shared catalogs or save customers, leading to inconsistencies. With multiple stores, the restricted admin cannot see new companies or custom shared catalogs.

Steps to reproduce

1. Set up stores in the following order: * Create a new website named W2. * Create a new store view for the default website. * Create a new store named W2S2 for website W2. * Create a new store view named W2S2SV1 for the store W2S2. * Create another new store view named W2S2SV2 for the store W2S2. * Create a company for W2. 1. Assign products: * Assign some products to W1 only. * Assign some products to W2 only. * Assign some products to both W1 and W2. 1. Create a custom shared catalog and assign all products to it. 1. Create a custom admin role with access to only W2S2, not W2. 1. Assign the restricted admin user to the new custom admin role. 1. Log in as the restricted admin user. 1. Verify access: * Check which companies you can see. * Check which shared catalogs you can see. * Open the products list and verify if you can see all the shared catalogs to which the products are assigned.

Adobe's page lists 2.4.3 - 2.4.4-p9 as compatible; the versions below are resolved from the current QPT constraints and are the ones the tool will offer.

Adobe scheduled the permanent fix for 2.5.0.

Install

Install the Quality Patches Tool with composer require magento/quality-patches, apply the prerequisites listed for all files applicable to your distribution and version first, then run vendor/bin/magento-patches apply ACSD-57570. On Cloud, add ACSD-57570 under stage.build.QUALITY_PATCHES in .magento.env.yaml.

For cweagans/composer-patches, choose a compatible version below and download the bundle. Copy its ACSD-57570/ folder into patches/composer/, merge composer.patches.json into composer.json, then run composer install. Bundle prerequisites the same way and list them first. Paths are relative to each package root, using the default -p1 level. Prefer local files when configuring composer-patches; a remote URL can change.

Patch files and compatible versions

Packages across compatible versions (2): magento/module-customer, magento/module-user
Packages across compatible versions (5): magento/module-shared-catalog, magento/module-admin-gws, magento/module-support, magento/module-customer, magento/module-user

magento/magento2-b2b-base >=1.3.3 <1.3.3-p10

Magento Open Source
—
Adobe Commerce
2.4.4-p9, 2.4.4-p8, 2.4.4-p7, 2.4.4-p6, 2.4.4-p5, 2.4.4-p4, 2.4.4-p3, 2.4.4-p2, 2.4.4-p1, 2.4.4
Patch file
patches/commerce/ACSD-57570_1.3.3-p3.patch
  • vendor/magento/module-shared-catalog/Controller/Adminhtml/SharedCatalog/Configure/Save.php
  • vendor/magento/module-shared-catalog/Model/Configure/Category.php
  • vendor/magento/module-shared-catalog/Observer/Controller/SaveProduct.php (deleted)
  • vendor/magento/module-shared-catalog/Plugin/Backend/Block/Adminhtml/Store/SwitcherRolePermissions.php (added)
  • vendor/magento/module-shared-catalog/Plugin/Catalog/Controller/Adminhtml/Product/Save.php (added)
  • vendor/magento/module-shared-catalog/Plugin/SharedCatalog/CollectionFilter.php (added)
  • vendor/magento/module-shared-catalog/Plugin/Ui/DataProvider/WebsiteRolePermissions.php (added)
  • vendor/magento/module-shared-catalog/Ui/DataProvider/Configure/AbstractDataProvider.php
  • vendor/magento/module-shared-catalog/etc/adminhtml/di.xml
  • vendor/magento/module-shared-catalog/etc/adminhtml/events.xml
  • vendor/magento/module-shared-catalog/view/adminhtml/web/js/grid/filters/configure/filters.js

magento/magento2-b2b-base >=1.4.2 <1.5.0

Magento Open Source
—
Adobe Commerce
2.4.7-p2, 2.4.7-p1, 2.4.7
Patch file
patches/commerce/ACSD-65171_1.4.2.patch
  • vendor/magento/module-shared-catalog/Model/SharedCatalogValidator.php
  • vendor/magento/module-shared-catalog/Plugin/Backend/Block/Adminhtml/Store/SwitcherRolePermissions.php
  • vendor/magento/module-shared-catalog/Plugin/SharedCatalog/CollectionFilter.php (added)
  • vendor/magento/module-shared-catalog/Plugin/Ui/DataProvider/WebsiteRolePermissions.php
  • vendor/magento/module-shared-catalog/ViewModel/Store/SwitcherAllowedValues.php (added)
  • vendor/magento/module-shared-catalog/etc/adminhtml/di.xml
  • vendor/magento/module-shared-catalog/etc/webapi_rest/di.xml
  • vendor/magento/module-shared-catalog/etc/webapi_soap/di.xml
  • vendor/magento/module-shared-catalog/view/adminhtml/layout/shared_catalog_sharedcatalog_wizard.xml
  • vendor/magento/module-shared-catalog/view/adminhtml/templates/wizard/step/pricing/store/switcher.phtml
  • vendor/magento/module-shared-catalog/view/adminhtml/templates/wizard/step/structure/store/switcher.phtml

magento/magento2-ee-base >=2.4.4 <2.4.4-p4

Magento Open Source
—
Adobe Commerce
2.4.4-p3, 2.4.4-p2, 2.4.4-p1, 2.4.4
Requires
ACSD-51291
Patch file
patches/commerce/ACSD-57570_2.4.4-p3.patch
  • vendor/magento/module-admin-gws/Model/ForceWhitelistRegistry.php (added)
  • vendor/magento/module-admin-gws/Model/Plugin/Store/StoreSwitcher/ManageStoreCookie.php (added)
  • vendor/magento/module-admin-gws/Observer/SetDataBeforeRoleSave.php
  • vendor/magento/module-admin-gws/Observer/ValidateModelLoadAfter.php
  • vendor/magento/module-admin-gws/Plugin/Customer/Block/Adminhtml/Group/IsCustomerAllowedToAddCustomerGroupButtonPlugin.php (added)
  • vendor/magento/module-admin-gws/Plugin/Customer/Model/ResourceModel/Grid/Collection.php (added)
  • vendor/magento/module-admin-gws/Plugin/Customer/Ui/Component/Listing/Column/CanHideDeleteButton.php (added)
  • vendor/magento/module-admin-gws/Plugin/CustomerBalance/Model/Creditmemo/BalancePlugin.php (added)
  • vendor/magento/module-admin-gws/Plugin/StoreFilter.php
  • vendor/magento/module-admin-gws/etc/adminhtml/di.xml
  • vendor/magento/module-support/Console/Command/BackupDbCommand.php

magento/magento2-ee-base >=2.4.4-p4 <2.4.4-p10

Magento Open Source
—
Adobe Commerce
2.4.4-p9, 2.4.4-p8, 2.4.4-p7, 2.4.4-p6, 2.4.4-p5, 2.4.4-p4
Patch file
patches/commerce/ACSD-57570_2.4.4-p3_v1.patch
  • vendor/magento/module-admin-gws/Model/ForceWhitelistRegistry.php (added)
  • vendor/magento/module-admin-gws/Model/Plugin/Store/StoreSwitcher/ManageStoreCookie.php (added)
  • vendor/magento/module-admin-gws/Observer/SetDataBeforeRoleSave.php
  • vendor/magento/module-admin-gws/Observer/ValidateModelLoadAfter.php
  • vendor/magento/module-admin-gws/Plugin/Customer/Block/Adminhtml/Group/IsCustomerAllowedToAddCustomerGroupButtonPlugin.php (added)
  • vendor/magento/module-admin-gws/Plugin/Customer/Model/ResourceModel/Grid/Collection.php (added)
  • vendor/magento/module-admin-gws/Plugin/Customer/Ui/Component/Listing/Column/CanHideDeleteButton.php (added)
  • vendor/magento/module-admin-gws/Plugin/CustomerBalance/Model/Creditmemo/BalancePlugin.php (added)
  • vendor/magento/module-admin-gws/Plugin/StoreFilter.php
  • vendor/magento/module-admin-gws/etc/adminhtml/di.xml
  • vendor/magento/module-support/Console/Command/BackupDbCommand.php

magento/magento2-ee-base >=2.4.7 <2.4.7-p3

Magento Open Source
—
Adobe Commerce
2.4.7-p2, 2.4.7-p1, 2.4.7
Patch file
patches/commerce/ACSD-65171_2.4.7.patch
  • vendor/magento/module-admin-gws/Observer/SetDataBeforeRoleSave.php
  • vendor/magento/module-admin-gws/Plugin/Customer/Model/ResourceModel/Customer/Collection.php (added)
  • vendor/magento/module-admin-gws/etc/adminhtml/di.xml
  • vendor/magento/module-admin-gws/etc/webapi_rest/di.xml (added)
  • vendor/magento/module-admin-gws/etc/webapi_soap/di.xml (added)

magento/magento2-base >=2.4.4 <2.4.4-p10

Magento Open Source
2.4.4-p9, 2.4.4-p8, 2.4.4-p7, 2.4.4-p6, 2.4.4-p5, 2.4.4-p4, 2.4.4-p3, 2.4.4-p2, 2.4.4-p1, 2.4.4
Adobe Commerce
2.4.4-p9, 2.4.4-p8, 2.4.4-p7, 2.4.4-p6, 2.4.4-p5, 2.4.4-p4, 2.4.4-p3, 2.4.4-p2, 2.4.4-p1, 2.4.4
Patch file
patches/os/ACSD-57570_2.4.4-p3.patch
  • vendor/magento/module-customer/Block/Adminhtml/Group/AddCustomerGroupButton.php (added)
  • vendor/magento/module-customer/Ui/Component/Listing/Column/GroupActions.php
  • vendor/magento/module-customer/view/adminhtml/ui_component/customer_group_listing.xml
  • vendor/magento/module-user/Controller/Adminhtml/User/Role/SaveRole.php

Sources

Łukasz Bajsarowicz
Built by

Łukasz Bajsarowicz, e-commerce architect

Magento and Adobe Commerce architecture, upgrades, performance and audits for merchants and agencies since 2015; magento.watch is the tooling I use on those projects.

Open source, maintained on weekends.