Module: check_mk
Branch: master
Commit: dae7dafa82b3a4288c494e77159d0e8466db31bc
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=dae7dafa82b3a4…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Jul 26 10:00:31 2018 +0200
6353 FIX LDAP sync: Do not add a pending change when sync is executed on slave sites
To prevent synchronization problems from WATO master to slave sites when a remote
LDAP sync is performed we don't create pending change entries on the slave
sites anymore when user changes are made by the automatic synchronization.
Change-Id: I9e7e384f37915f2faf038ac7b98bd1634a794d21
---
.werks/6353 | 13 +++++++++++++
cmk/gui/plugins/userdb/ldap_connector.py | 4 ++--
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/.werks/6353 b/.werks/6353
new file mode 100644
index 0000000..456981a
--- /dev/null
+++ b/.werks/6353
@@ -0,0 +1,13 @@
+Title: LDAP sync: Do not add a pending change when sync is executed on slave sites
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1531895586
+
+To prevent synchronization problems from WATO master to slave sites when a remote
+LDAP sync is performed we don't create pending change entries on the slave
+sites anymore when user changes are made by the automatic synchronization.
diff --git a/cmk/gui/plugins/userdb/ldap_connector.py
b/cmk/gui/plugins/userdb/ldap_connector.py
index f4a834f..c221939 100644
--- a/cmk/gui/plugins/userdb/ldap_connector.py
+++ b/cmk/gui/plugins/userdb/ldap_connector.py
@@ -1119,8 +1119,8 @@ class LDAPUserConnector(UserConnector):
duration = time.time() - start_time
self._logger.info('SYNC FINISHED - Duration: %0.3f sec', duration)
- if changes:
- import cmk.gui.watolib as watolib # TODO: Cleanup
+ import cmk.gui.watolib as watolib # TODO: Cleanup
+ if changes and not config.is_wato_slave_site():
watolib.add_change("edit-users",
"<br>\n".join(changes), add_user=False)
userdb.save_users(users)