Skip to content

Commit 2379920

Browse files
AnujNehraAnujNehra
authored andcommitted
ACP2E-1776: Creating customer(-s) via Async REST API ignores group_id
1 parent 32c2b74 commit 2379920

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

app/code/Magento/Webapi/Plugin/SyncRequestCustomerGroupAuthorization.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,17 @@ public function __construct(
4747
*
4848
* @param AccountManagementApi $accountManagementApi
4949
* @param CustomerInterface $customer
50+
* @param string|null $password
51+
* @param string $redirectUrl
5052
* @return void
51-
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
5253
* @throws AuthorizationException
54+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
5355
*/
5456
public function beforeCreateAccount(
5557
AccountManagementApi $accountManagementApi,
56-
CustomerInterface $customer
58+
CustomerInterface $customer,
59+
string $password = null,
60+
string $redirectUrl = ''
5761
): void {
5862
$groupId = $customer->getGroupId();
5963
if (isset($groupId) && !$this->authorization->isAllowed(self::ADMIN_RESOURCE)) {

app/code/Magento/WebapiAsync/Plugin/AsynchronousOperations/AsyncRequestCustomerGroupAuthorization.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,18 @@ public function __construct(
4747
* @param MassSchedule $massSchedule
4848
* @param string $topic
4949
* @param array $entitiesArray
50+
* @param string|null $groupId
51+
* @param string|null $userId
5052
* @return void
5153
* @throws AuthorizationException
5254
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
5355
*/
5456
public function beforePublishMass(
5557
MassSchedule $massSchedule,
56-
string $topic,
57-
array $entitiesArray
58+
string $topic,
59+
array $entitiesArray,
60+
string $groupId = null,
61+
string $userId = null
5862
): void {
5963
foreach ($entitiesArray as $entityParams) {
6064
foreach ($entityParams as $customer) {

0 commit comments

Comments
 (0)