Skip to content

Commit f3655ca

Browse files
committed
MAGETWO-95365: Update Magento\Ui\Controller\Adminhtml\Index\Render\Handle controller
1 parent 952d446 commit f3655ca

File tree

2 files changed

+6
-3
lines changed
  • app/code/Magento/Ui/Controller/Adminhtml/Index/Render
  • dev/tests/integration/testsuite/Magento/Ui/Controller/Adminhtml/Index/Renderer

2 files changed

+6
-3
lines changed

app/code/Magento/Ui/Controller/Adminhtml/Index/Render/Handle.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function execute()
5555
$context = $this->contextFactory->create(
5656
[
5757
'namespace' => $namespace,
58-
'pageLayout' => $layout
58+
'pageLayout' => $layout,
5959
]
6060
);
6161

@@ -79,14 +79,15 @@ public function execute()
7979
* @param mixed $dataProviderConfigData
8080
* @return bool
8181
*/
82-
private function validateAclResource($dataProviderConfigData)
82+
private function validateAclResource($dataProviderConfigData): bool
8383
{
8484
if (isset($dataProviderConfigData['aclResource'])
8585
&& !$this->_authorization->isAllowed($dataProviderConfigData['aclResource'])
8686
) {
8787
if (!$this->_request->isAjax()) {
8888
$this->_redirect('admin/denied');
8989
}
90+
9091
return false;
9192
}
9293

dev/tests/integration/testsuite/Magento/Ui/Controller/Adminhtml/Index/Renderer/HandleTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
use Magento\Framework\AuthorizationInterface;
1212

1313
/**
14+
* Test for \Magento\Ui\Controller\Adminhtml\Index\Render\Handle.
15+
*
1416
* @magentoAppArea adminhtml
1517
*/
1618
class HandleTest extends \Magento\TestFramework\TestCase\AbstractBackendController
@@ -23,7 +25,7 @@ public function testExecuteWhenUserDoesNotHavePermission()
2325
Bootstrap::getObjectManager()->configure([
2426
'preferences' => [
2527
AuthorizationInterface::class => \Magento\Ui\Model\AuthorizationMock::class,
26-
]
28+
],
2729
]);
2830
$this->getRequest()->setParam('handle', 'customer_index_index');
2931
$this->getRequest()->setParam('namespace', 'customer_listing');

0 commit comments

Comments
 (0)