Skip to content

Commit c2a210a

Browse files
committed
ACP2E-3208: [Cloud] Users with a specific role cannot login
1 parent e1b6b84 commit c2a210a

File tree

3 files changed

+20
-25
lines changed

3 files changed

+20
-25
lines changed

app/code/Magento/Config/Block/System/Config/Edit.php

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -75,29 +75,27 @@ protected function _prepareLayout()
7575
{
7676
/** @var $section \Magento\Config\Model\Config\Structure\Element\Section */
7777
$section = $this->_configStructure->getElement($this->getRequest()->getParam('section'));
78-
if ($section !== null) {
79-
$this->_formBlockName = $section->getFrontendModel();
80-
if (empty($this->_formBlockName)) {
81-
$this->_formBlockName = self::DEFAULT_SECTION_BLOCK;
82-
}
83-
$this->setTitle($section->getLabel());
84-
$this->setHeaderCss($section->getHeaderCss());
78+
$this->_formBlockName = $section->getFrontendModel();
79+
if (empty($this->_formBlockName)) {
80+
$this->_formBlockName = self::DEFAULT_SECTION_BLOCK;
81+
}
82+
$this->setTitle($section->getLabel());
83+
$this->setHeaderCss($section->getHeaderCss());
8584

86-
$this->getToolbar()->addChild(
87-
'save_button',
88-
\Magento\Backend\Block\Widget\Button::class,
89-
[
90-
'id' => 'save',
91-
'label' => __('Save Config'),
92-
'class' => 'save primary',
93-
'data_attribute' => [
94-
'mage-init' => ['button' => ['event' => 'save', 'target' => '#config-edit-form']],
95-
]
85+
$this->getToolbar()->addChild(
86+
'save_button',
87+
\Magento\Backend\Block\Widget\Button::class,
88+
[
89+
'id' => 'save',
90+
'label' => __('Save Config'),
91+
'class' => 'save primary',
92+
'data_attribute' => [
93+
'mage-init' => ['button' => ['event' => 'save', 'target' => '#config-edit-form']],
9694
]
97-
);
98-
$block = $this->getLayout()->createBlock($this->_formBlockName);
99-
$this->setChild('form', $block);
100-
}
95+
]
96+
);
97+
$block = $this->getLayout()->createBlock($this->_formBlockName);
98+
$this->setChild('form', $block);
10199
return parent::_prepareLayout();
102100
}
103101

app/code/Magento/Config/Model/Config/Structure.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,9 +228,6 @@ public function getFirstSection()
228228
*/
229229
public function getElementByPathParts(array $pathParts)
230230
{
231-
if (empty($pathParts)) {
232-
return null;
233-
}
234231
$path = implode('_', $pathParts);
235232
if (isset($this->_elements[$path])) {
236233
return $this->_elements[$path];

app/code/Magento/Paypal/Model/Config/StructurePlugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public static function getPaypalConfigCountries($addOther = false)
100100
*/
101101
public function aroundGetElementByPathParts(Structure $subject, \Closure $proceed, array $pathParts)
102102
{
103-
$isSectionChanged = !empty($pathParts[0]) && $pathParts[0] === 'payment';
103+
$isSectionChanged = $pathParts[0] == 'payment';
104104

105105
if ($isSectionChanged) {
106106
$requestedCountrySection = 'payment_' . strtolower($this->backendHelper->getConfigurationCountryCode());

0 commit comments

Comments
 (0)