Module: check_mk
Branch: master
Commit: cf4aea64fc00021329f3d6fa712feb99bac7ab02
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=cf4aea64fc0002…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Jan 22 15:26:59 2016 +0100
#2945 FIX LDAP: Fixed broken sync for LDAP connections named "ldap"
Custom LDAP connections created with the ID "ldap" could not synchronize
users correctly.
---
.werks/2945 | 10 ++++++++++
ChangeLog | 1 +
web/htdocs/userdb.py | 5 +++--
3 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/.werks/2945 b/.werks/2945
new file mode 100644
index 0000000..30b1c43
--- /dev/null
+++ b/.werks/2945
@@ -0,0 +1,10 @@
+Title: LDAP: Fixed broken sync for LDAP connections named "ldap"
+Level: 1
+Component: multisite
+Compatible: compat
+Version: 1.2.7i4
+Date: 1453472773
+Class: fix
+
+Custom LDAP connections created with the ID "ldap" could not synchronize
+users correctly.
diff --git a/ChangeLog b/ChangeLog
index 1890d93..eb42ac9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -239,6 +239,7 @@
* 2901 FIX: Fixed issue editing availability annotations...
* 2904 FIX: Improved error handling when custom url dashlets raise an exception...
* 2830 FIX: Improved sorting in view column "Services colored according to
state"...
+ * 2945 FIX: LDAP: Fixed broken sync for LDAP connections named "ldap"...
WATO:
* 2442 WATO remove host: improved cleanup of obsolete host files...
diff --git a/web/htdocs/userdb.py b/web/htdocs/userdb.py
index b8753f8..2b74935 100644
--- a/web/htdocs/userdb.py
+++ b/web/htdocs/userdb.py
@@ -104,8 +104,9 @@ def cleanup_connection_id(connection_id):
# Old Check_MK used a static "ldap" connector id for all LDAP users.
# Since Check_MK now supports multiple LDAP connections, the ID has
- # been changed to "default"
- if connection_id == 'ldap':
+ # been changed to "default". But only transform this when there is
+ # no connection existing with the id LDAP.
+ if connection_id == 'ldap' and not get_connection('ldap'):
connection_id = 'default'
return connection_id