Skip to content

Commit d502f6b

Browse files
committed
MAGETWO-70133: 404 page for not allowed magento config sections
1 parent 2fe1e4e commit d502f6b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

app/code/Magento/Config/Controller/Adminhtml/System/AbstractConfig.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,18 @@ abstract class AbstractConfig extends \Magento\Backend\App\AbstractAction
2828

2929
/**
3030
* @deprecated
31-
* @var ConfigSectionChecker
3231
*/
3332
protected $_sectionChecker;
3433

3534
/**
3635
* @param \Magento\Backend\App\Action\Context $context
3736
* @param \Magento\Config\Model\Config\Structure $configStructure
38-
* @param ConfigSectionChecker $sectionChecker
37+
* @param $sectionChecker - deprecated
3938
*/
4039
public function __construct(
4140
\Magento\Backend\App\Action\Context $context,
4241
\Magento\Config\Model\Config\Structure $configStructure,
43-
ConfigSectionChecker $sectionChecker
42+
$sectionChecker
4443
) {
4544
parent::__construct($context);
4645
$this->_configStructure = $configStructure;
@@ -60,6 +59,7 @@ public function dispatch(\Magento\Framework\App\RequestInterface $request)
6059
$request->setParam('section', $this->_configStructure->getFirstSection()->getId());
6160
} catch (LocalizedException $e) {
6261
/** If visible section not found need to show only config index page without sections if it allow. */
62+
$this->messageManager->addWarningMessage($e->getMessage());
6363
}
6464
}
6565
return parent::dispatch($request);

app/code/Magento/Config/Controller/Adminhtml/System/ConfigSectionChecker.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
use Magento\Framework\Exception\NotFoundException;
1010

1111
/**
12-
* @deprecated Due of not use.
12+
* @deprecated - unused class.
1313
* @see \Magento\Config\Model\Config\Structure\Element\Section::isAllowed()
1414
*/
1515
class ConfigSectionChecker

0 commit comments

Comments
 (0)