From 33956e02f82d638b3202bd0e3dc726760cc6d9ad Mon Sep 17 00:00:00 2001 From: Markus Frosch Date: Tue, 20 Oct 2015 10:02:42 +0200 Subject: [PATCH 1/2] Fix collection of user_base_dn from the UserBackend Currently the group_base_dn is used, unless a user_base_dn is configured in the group backend. refs #10402 --- .../Icinga/Authentication/UserGroup/LdapUserGroupBackend.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/Icinga/Authentication/UserGroup/LdapUserGroupBackend.php b/library/Icinga/Authentication/UserGroup/LdapUserGroupBackend.php index 65187dcd4..23dd4d6c9 100644 --- a/library/Icinga/Authentication/UserGroup/LdapUserGroupBackend.php +++ b/library/Icinga/Authentication/UserGroup/LdapUserGroupBackend.php @@ -607,7 +607,7 @@ class LdapUserGroupBackend extends LdapRepository implements UserGroupBackendInt return $this ->setGroupBaseDn($config->base_dn) - ->setUserBaseDn($config->get('user_base_dn', $this->getGroupBaseDn())) + ->setUserBaseDn($config->get('user_base_dn', $defaults->user_base_dn)) ->setGroupClass($config->get('group_class', $defaults->group_class)) ->setUserClass($config->get('user_class', $defaults->user_class)) ->setGroupNameAttribute($config->get('group_name_attribute', $defaults->group_name_attribute)) From 0b9a1415916fd295f7abf18c3951626234d54b35 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Tue, 20 Oct 2015 11:28:18 +0200 Subject: [PATCH 2/2] LdapUserGroupBackend: Use the group_base_dn as user_base_dn.. ..if neither the config nor the defaults provide a value. refs #10402 --- .../Icinga/Authentication/UserGroup/LdapUserGroupBackend.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/Icinga/Authentication/UserGroup/LdapUserGroupBackend.php b/library/Icinga/Authentication/UserGroup/LdapUserGroupBackend.php index 23dd4d6c9..a25f8ad96 100644 --- a/library/Icinga/Authentication/UserGroup/LdapUserGroupBackend.php +++ b/library/Icinga/Authentication/UserGroup/LdapUserGroupBackend.php @@ -607,7 +607,7 @@ class LdapUserGroupBackend extends LdapRepository implements UserGroupBackendInt return $this ->setGroupBaseDn($config->base_dn) - ->setUserBaseDn($config->get('user_base_dn', $defaults->user_base_dn)) + ->setUserBaseDn($config->get('user_base_dn', $defaults->get('user_base_dn', $this->getGroupBaseDn()))) ->setGroupClass($config->get('group_class', $defaults->group_class)) ->setUserClass($config->get('user_class', $defaults->user_class)) ->setGroupNameAttribute($config->get('group_name_attribute', $defaults->group_name_attribute))