Skip to content

Commit cda2c70

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

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,25 +21,25 @@ class EditAction extends \Magento\Backend\Ui\Component\Listing\Column\EditAction
2121
/**
2222
* @var AuthorizationInterface
2323
*/
24-
private $authorization;
24+
private $authorizationObject;
2525

2626
/**
2727
* @param ContextInterface $context
2828
* @param UiComponentFactory $uiComponentFactory
2929
* @param UrlInterface $urlBuilder
3030
* @param array $components
3131
* @param array $data
32-
* @param AuthorizationInterface|null $authorization
32+
* @param AuthorizationInterface|null $authorizationObject
3333
*/
3434
public function __construct(
3535
ContextInterface $context,
3636
UiComponentFactory $uiComponentFactory,
3737
UrlInterface $urlBuilder,
3838
array $components = [],
3939
array $data = [],
40-
?AuthorizationInterface $authorization = null
40+
?AuthorizationInterface $authorizationObject = null
4141
) {
42-
$this->authorization = $authorization ?? ObjectManager::getInstance()->get(AuthorizationInterface::class);
42+
$this->authorizationObject = $authorizationObject ?? ObjectManager::getInstance()->get(AuthorizationInterface::class);
4343
parent::__construct($context, $uiComponentFactory, $urlBuilder, $components, $data);
4444
}
4545

@@ -55,7 +55,7 @@ public function prepareDataSource(array $sourceData)
5555
foreach ($sourceData['data']['items'] as &$item) {
5656
if (!empty($item[$actionsTitle]['edit'])) {
5757
$item[$actionsTitle]['edit']['hidden'] =
58-
!$this->authorization->isAllowed('Magento_InventoryApi::stock_edit');
58+
!$this->authorizationObject->isAllowed('Magento_InventoryApi::stock_edit');
5959
}
6060
}
6161
}

0 commit comments

Comments
 (0)