Skip to content

Commit 0647818

Browse files
author
OlgaVasyltsun
committed
MC-34751: ACL changes for Stock
1 parent 6e756b8 commit 0647818

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

InventoryAdminUi/Ui/Component/Listing/Stock/Column/EditAction.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,20 +46,20 @@ public function __construct(
4646
/**
4747
* @inheritDoc
4848
*/
49-
public function prepareDataSource(array $dataSource)
49+
public function prepareDataSource(array $sourceData)
5050
{
51-
$dataSource = parent::prepareDataSource($dataSource);
52-
$actionsName = $this->getData('name');
51+
$sourceData = parent::prepareDataSource($sourceData);
52+
$actionsTitle = $this->getData('name');
5353

54-
if (isset($dataSource['data']['items'])) {
55-
foreach ($dataSource['data']['items'] as &$item) {
56-
if (!empty($item[$actionsName]['edit'])) {
57-
$item[$actionsName]['edit']['hidden'] =
54+
if (isset($sourceData['data']['items'])) {
55+
foreach ($sourceData['data']['items'] as &$item) {
56+
if (!empty($item[$actionsTitle]['edit'])) {
57+
$item[$actionsTitle]['edit']['hidden'] =
5858
!$this->authorization->isAllowed('Magento_InventoryApi::stock_edit');
5959
}
6060
}
6161
}
6262

63-
return $dataSource;
63+
return $sourceData;
6464
}
6565
}

0 commit comments

Comments
 (0)