ACSD-51907: Restricted admin user can't create a credit memo with an offline refund
Restricted admin user can't create a credit memo with an offline refund. Quality patch ACSD-51907 for magento/module-admin-gws applies to Magento Open Source and Adobe Commerce 2.4.2 to 2.4.2-p2.
- Categories
- Admin, Order/Checkout
- Components
- magento/module-admin-gws
- Origin
- adobe-commerce-support
- Since QPT
- 1.1.33
Issue
Restricted admin user can't create a credit memo with an offline refund.
Steps to reproduce
1. Create a customer on the default website. 1. Create new website with related store and store view. 1. Set default website to the new website, clear caches. 1. Change customer Configuration: Admin > Store > Configuration > Customers > Customer Configuration > Share Customer Accounts = Global. 1. Create a new admin user role with the role scope set to new created website (access to sales data only) in Admin > System > Permissions. 1. Create a new admin account with this role. 1. Create new order using online payment method (e.g. Auth.net or PayPal). 1. Login as a restricted admin user. 1. Go to Sales > Orders > then order view page. 1. Create an Invoice. 1. Navigate to the Invoices Tab. 1. Click on Invoice. 1. Click on Credit Memo. 1. Check the Refund to Store Credit checkbox, set the text field near it to the 1 value. 1. Click on the Refund Offline button.
Adobe's page lists 2.4.2 < 2.4.3-p3 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.4.7.
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-51907. On Cloud, add ACSD-51907 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-51907/ 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
magento/magento2-ee-base >=2.4.2 <2.4.3
- Magento Open Source
- —
- vendor/magento/module-admin-gws/Model/ForceWhitelistRegistry.php (added)
- vendor/magento/module-admin-gws/Observer/ValidateModelLoadAfter.php
- vendor/magento/module-admin-gws/Plugin/CustomerBalance/Model/Creditmemo/BalancePlugin.php (added)
- vendor/magento/module-admin-gws/etc/adminhtml/di.xml
