Module: check_mk
Branch: master
Commit: 3119cfa562d3a3eee4a1936d9930c19b1620b0bd
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3119cfa562d3a3…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Apr 19 13:29:32 2017 +0200
CME: Filtering LDAP connections now correctly
Change-Id: Ife4e6c2f417bf0c17fcf2f43114af7b0a511b687
---
web/htdocs/userdb.py | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/web/htdocs/userdb.py b/web/htdocs/userdb.py
index 699f977..9bad29c 100644
--- a/web/htdocs/userdb.py
+++ b/web/htdocs/userdb.py
@@ -1094,12 +1094,15 @@ def load_connection_config():
return user_connections
-def save_connection_config(connections):
+def save_connection_config(connections, base_dir=None):
+ if not base_dir:
+ base_dir = multisite_dir
+
output = "# Written by Multisite UserDB\n# encoding: utf-8\n\n"
output += "user_connections = \\\n%s\n\n" % pprint.pformat(connections)
- make_nagios_directory(multisite_dir)
- store.save_file(multisite_dir + "user_connections.mk", output)
+ make_nagios_directory(base_dir)
+ store.save_file(os.path.join(base_dir, "user_connections.mk"), output)
#.
# .--ConnectorAPI--------------------------------------------------------.