Setup: Provide a default user filter for ActiveDirectory backends

fixes #8703
This commit is contained in:
Johannes Meyer 2015-06-25 14:22:50 +02:00
parent 86bdf81396
commit d95874b84c
2 changed files with 24 additions and 5 deletions

View File

@ -92,7 +92,9 @@ class LdapBackendForm extends Form
'text',
'filter',
array(
'preserveDefault' => true,
'allowEmpty' => true,
'value' => $isAd ? '!(objectClass=computer)' : null,
'label' => $this->translate('LDAP Filter'),
'description' => $this->translate(
'An additional filter to use when looking up users using the specified connection. '

View File

@ -78,6 +78,23 @@ class AuthBackendPage extends Form
'Before you are able to authenticate using the LDAP connection defined earlier you need to'
. ' provide some more information so that Icinga Web 2 is able to locate account details.'
));
$this->addElement(
'select',
'type',
array(
'ignore' => true,
'required' => true,
'autosubmit' => true,
'label' => $this->translate('Backend Type'),
'description' => $this->translate(
'The type of the resource being used for this authenticaton provider'
),
'multiOptions' => array(
'ldap' => 'LDAP',
'msldap' => 'ActiveDirectory'
)
)
);
} else { // $this->config['type'] === 'external'
$backendForm = new ExternalBackendForm();
$backendForm->createElements($formData);