Module: check_mk
Branch: master
Commit: 4952ac3a1e1ab8954f4d9dead10d36aa99a08260
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4952ac3a1e1ab8…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Jun 26 15:52:36 2015 +0200
Fixed exceptions on ldap connection edit page
---
web/htdocs/wato.py | 3 ++-
web/plugins/userdb/ldap.py | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 903cfe5..bf308da 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -7603,6 +7603,7 @@ def vs_ldap_connection(new):
def mode_edit_ldap_connection(phase):
connection_id = html.var("id")
connections = userdb.load_connection_config()
+ userdb.set_connection(connection_id)
connection = {}
if connection_id == None:
new = True
@@ -7651,6 +7652,7 @@ def mode_edit_ldap_connection(phase):
userdb.save_connection_config(connections)
config.user_connections = connections # make directly available on current page
+ userdb.set_connection(connection_id)
if html.var("_save"):
return "ldap_config"
else:
@@ -7785,7 +7787,6 @@ def mode_edit_ldap_connection(phase):
(_('Sync-Plugin: Roles'), test_groups_to_roles),
]
- userdb.set_connection(connection_id)
for address in userdb.ldap_servers():
html.write('<h3>%s: %s</h3>' % (_('Server'),
address))
table.begin('test', searchable = False)
diff --git a/web/plugins/userdb/ldap.py b/web/plugins/userdb/ldap.py
index a831a77..f0d080c 100644
--- a/web/plugins/userdb/ldap.py
+++ b/web/plugins/userdb/ldap.py
@@ -1294,6 +1294,7 @@ def ldap_migrate_config():
key = what + "_" + key
connection[key] = val
+ save_connection_config([connection])
config.user_connections.append(connection)