Module: check_mk
Branch: master
Commit: 6690e236a0d3e0dc166c624f3badff6fca3babf8
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6690e236a0d3e0…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Jul 2 10:34:15 2015 +0200
Fixed custom user attribute syncing when "on page load" sync is disabled
---
web/plugins/userdb/ldap.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/web/plugins/userdb/ldap.py b/web/plugins/userdb/ldap.py
index 18084bf..f708028 100644
--- a/web/plugins/userdb/ldap.py
+++ b/web/plugins/userdb/ldap.py
@@ -789,6 +789,8 @@ class LDAPUserConnector(UserConnector):
if not self.has_user_base_dn_configured():
return # silently skip sync without configuration
+ register_user_attribute_sync_plugins()
+
# Flush ldap related before each sync to have a caching only for the
# current sync process
self.flush_caches()
@@ -913,8 +915,6 @@ class LDAPUserConnector(UserConnector):
# Is called on every multisite http request
def on_page_load(self):
- register_user_attribute_sync_plugins()
-
if self.sync_is_needed():
try:
self.do_sync(False, None)
@@ -1007,6 +1007,8 @@ def ldap_list_attribute_plugins():
# Returns a list of pairs (key, parameters) of all available attribute plugins
def ldap_attribute_plugins_elements():
+ register_user_attribute_sync_plugins()
+
elements = []
items = sorted(ldap_attribute_plugins.items(), key = lambda x:
x[1]['title'])
for key, plugin in items: