Module: check_mk
Branch: master
Commit: ec75090ee1ab5a7ef996a8125fd147bd4be6ba7a
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ec75090ee1ab5a…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Aug 8 08:55:09 2018 +0200
6430 FIX LDAP: Sync detected password changes only to login sites
This is a minor performance improvement. The number of destination sites
a user profile is synchronized to in case a password change is detected
in LDAP is reduced to the sites where access to the GUI is allowed.
Change-Id: I7a088fe629a9ade5318ed22669c79edcb7a2506b
---
.werks/6430 | 12 ++++++++++++
cmk/gui/plugins/userdb/ldap_connector.py | 4 +---
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/.werks/6430 b/.werks/6430
new file mode 100644
index 0000000..0c81e7c
--- /dev/null
+++ b/.werks/6430
@@ -0,0 +1,12 @@
+Title: LDAP: Sync detected password changes only to login sites
+Level: 1
+Component: multisite
+Compatible: compat
+Edition: cre
+Version: 1.6.0i1
+Date: 1533711208
+Class: fix
+
+This is a minor performance improvement. The number of destination sites
+a user profile is synchronized to in case a password change is detected
+in LDAP is reduced to the sites where access to the GUI is allowed.
diff --git a/cmk/gui/plugins/userdb/ldap_connector.py
b/cmk/gui/plugins/userdb/ldap_connector.py
index 40446aa..f66cce8 100644
--- a/cmk/gui/plugins/userdb/ldap_connector.py
+++ b/cmk/gui/plugins/userdb/ldap_connector.py
@@ -1889,10 +1889,8 @@ def synchronize_profile_to_sites(logger, user_id, profile):
import cmk.gui.sites as sites
import cmk.gui.watolib as watolib # TODO: Cleanup
- # TODO: We only need to do this for login sites!
remote_sites = [(site_id, config.site(site_id))
- for site_id in config.sitenames()
- if not config.site_is_local(site_id) ]
+ for site_id in config.get_login_sites() ]
logger.info('Credentials changed: %s. Trying to sync to %d sites' %
(user_id, len(remote_sites)))