mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-27 07:44:04 +02:00
AuthBackendPage: Fix that re-populating the chosen LDAP type has no effect
...
This commit is contained in:
parent
eb4e56fbc0
commit
87deda86be
@ -71,6 +71,12 @@ class AuthBackendPage extends Form
|
|||||||
. 'to do now is defining a name for your first authentication backend.'
|
. 'to do now is defining a name for your first authentication backend.'
|
||||||
));
|
));
|
||||||
} elseif ($this->config['type'] === 'ldap') {
|
} elseif ($this->config['type'] === 'ldap') {
|
||||||
|
$type = null;
|
||||||
|
if (! isset($formData['type']) && isset($formData['backend'])) {
|
||||||
|
$type = $formData['backend'];
|
||||||
|
$formData['type'] = $type;
|
||||||
|
}
|
||||||
|
|
||||||
$backendForm = new LdapBackendForm();
|
$backendForm = new LdapBackendForm();
|
||||||
$backendForm->setResources(array($this->config['name']));
|
$backendForm->setResources(array($this->config['name']));
|
||||||
$backendForm->create($formData);
|
$backendForm->create($formData);
|
||||||
@ -94,7 +100,7 @@ class AuthBackendPage extends Form
|
|||||||
'ldap' => 'LDAP',
|
'ldap' => 'LDAP',
|
||||||
'msldap' => 'ActiveDirectory'
|
'msldap' => 'ActiveDirectory'
|
||||||
),
|
),
|
||||||
'value' => isset($formData['backend']) ? $formData['backend'] : null
|
'value' => $type
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
} else { // $this->config['type'] === 'external'
|
} else { // $this->config['type'] === 'external'
|
||||||
|
@ -138,9 +138,11 @@ class WebWizard extends Wizard implements SetupWizard
|
|||||||
} elseif ($authData['type'] === 'ldap') {
|
} elseif ($authData['type'] === 'ldap') {
|
||||||
$page->setResourceConfig($this->getPageData('setup_ldap_resource'));
|
$page->setResourceConfig($this->getPageData('setup_ldap_resource'));
|
||||||
|
|
||||||
$suggestions = $this->getPageData('setup_ldap_discovery');
|
if (! $this->hasPageData('setup_authentication_backend')) {
|
||||||
if (isset($suggestions['backend'])) {
|
$suggestions = $this->getPageData('setup_ldap_discovery');
|
||||||
$page->populate($suggestions['backend']);
|
if (isset($suggestions['backend'])) {
|
||||||
|
$page->populate($suggestions['backend']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->getDirection() === static::FORWARD) {
|
if ($this->getDirection() === static::FORWARD) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user