Merge pull request #674 from AnDann/LdapAnonym

* [MOD] Make anonymous bind to LDAP possible
This commit is contained in:
RubénD
2018-02-06 08:01:07 +01:00
committed by GitHub
3 changed files with 7 additions and 7 deletions

View File

@@ -120,7 +120,7 @@ abstract class LdapBase implements LdapInterface, AuthInterface
{
$this->LogMessage->setAction(__FUNCTION__);
if (!$this->searchBase || !$this->server || !$this->bindDn || !$this->bindPass) {
if (!$this->searchBase || !$this->server) {
$this->LogMessage->addDescription(__('Los parámetros de LDAP no están configurados', false));
$this->writeLog();
@@ -459,7 +459,7 @@ abstract class LdapBase implements LdapInterface, AuthInterface
$this->bindPass = Config::getConfig()->getLdapBindPass();
$this->group = Config::getConfig()->getLdapGroup();
if (!$this->searchBase || !$this->server || !$this->bindDn || !$this->bindPass) {
if (!$this->searchBase || !$this->server) {
$this->LogMessage->setAction(__FUNCTION__);
$this->LogMessage->addDescription(__('Los parámetros de LDAP no están configurados', false));
$this->writeLog();
@@ -705,4 +705,4 @@ abstract class LdapBase implements LdapInterface, AuthInterface
];
return preg_replace($chars, '\\\$1', $dn);
}
}
}

View File

@@ -88,7 +88,7 @@ class ChecksController implements ItemControllerInterface
$ldapBindUser = Request::analyze('ldap_binduser');
$ldapBindPass = Request::analyzeEncrypted('ldap_bindpass');
if (!$ldapServer || !$ldapBase || !$ldapBindUser || !$ldapBindPass) {
if (!$ldapServer || !$ldapBase) {
$this->JsonResponse->setDescription(__('Los parámetros de LDAP no están configurados', false));
return;
}
@@ -142,4 +142,4 @@ class ChecksController implements ItemControllerInterface
$this->JsonResponse->addMessage(__('Revise el registro de eventos para más detalles', false));
}
}
}
}

View File

@@ -396,7 +396,7 @@ class ConfigActionController implements ItemControllerInterface
$ldapBindPass = Request::analyzeEncrypted('ldap_bindpass');
// Valores para la configuración de LDAP
if ($ldapEnabled && (!$ldapServer || !$ldapBase || !$ldapBindUser)) {
if ($ldapEnabled && (!$ldapServer || !$ldapBase)) {
$this->JsonResponse->setDescription(__('Faltan parámetros de LDAP'));
return;
}
@@ -743,4 +743,4 @@ class ConfigActionController implements ItemControllerInterface
$this->JsonResponse->setDescription(__('Proceso de backup finalizado', false));
$this->JsonResponse->setStatus(0);
}
}
}