Skip to content

Commit 468da78

Browse files
committed
refactor to backward compatibility
1 parent da17c67 commit 468da78

File tree

5 files changed

+30
-26
lines changed

5 files changed

+30
-26
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?php
2+
/**
3+
*
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
namespace Magento\Backend\Controller\Adminhtml\Denied;
8+
9+
use Magento\Backend\Controller\Adminhtml\Denied;
10+
use Magento\Framework\App\Action\HttpGetActionInterface as HttpGet;
11+
use Magento\Framework\App\Action\HttpPostActionInterface as HttpPost;
12+
13+
/**
14+
* Denied Action
15+
*/
16+
class Index extends Denied implements HttpGet, HttpPost
17+
{
18+
19+
/**
20+
* Check if user has permissions to access this controller
21+
*
22+
* @return bool
23+
*/
24+
protected function _isAllowed()
25+
{
26+
return true;
27+
}
28+
}

app/code/Magento/Backend/Controller/Adminhtml/Index/Denied.php

Lines changed: 0 additions & 23 deletions
This file was deleted.

app/code/Magento/Backend/Model/Url.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ public function findFirstAvailableMenu()
349349
if ($user) {
350350
$user->setHasAvailableResources(false);
351351
}
352-
$action = '*/*/denied';
352+
$action = '*/denied';
353353
}
354354
return $action;
355355
}

app/code/Magento/Backend/Test/Unit/Model/UrlTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ public function testFindFirstAvailableMenuDenied()
190190

191191
$this->_menuMock->expects($this->any())->method('getFirstAvailableChild')->will($this->returnValue(null));
192192

193-
$this->assertEquals('*/*/denied', $this->_model->findFirstAvailableMenu());
193+
$this->assertEquals('*/denied', $this->_model->findFirstAvailableMenu());
194194
}
195195

196196
public function testFindFirstAvailableMenu()

dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Backend/_files/controller_acl_test_whitelist_ce.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
Magento\Security\Controller\Adminhtml\Session\Activity
22
Magento\Security\Controller\Adminhtml\Session\LogoutAll
33
Magento\Backend\Controller\Adminhtml\Denied
4-
Magento\Backend\Controller\Adminhtml\Index\Denied
54
Magento\Backend\Controller\Adminhtml\Noroute\Index
65
Magento\Directory\Controller\Adminhtml\Json\CountryRegion
76
Magento\Tax\Controller\Adminhtml\Rule\AjaxLoadRates

0 commit comments

Comments
 (0)