Module: check_mk
Branch: master
Commit: b68394b538a942866fdb17b501658d0cb2fae602
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b68394b538a942…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Jun 26 16:01:01 2015 +0200
Fixed exception while creating new connections
---
web/htdocs/wato.py | 5 +++--
web/plugins/userdb/ldap.py | 2 +-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index bf308da..b24507a 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -7252,7 +7252,8 @@ def mode_ldap_config(phase):
from_pos = int(html.var("_move"))
to_pos = int(html.var("_where"))
connection = connections[from_pos]
- log_pending(SYNC, None, "move-ldap-connection", _("Changed
position of LDAP connection %s") % (connection["id"]))
+ log_pending(SYNC, None, "move-ldap-connection", _("Changed
position of LDAP connection %s to %d") %
+
(connection["id"], to_pos))
del connections[from_pos] # make to_pos now match!
connections[to_pos:to_pos] = [connection]
userdb.save_connection_config(connections)
@@ -12344,7 +12345,7 @@ def mode_users(phase):
locked_attributes = userdb.locked_attributes(user_connection_id)
else:
table.cell(_("Connector"), "%s (%s) (disabled)" %
- (connector['short_title'], user_connection_id),
css="error")
+ (connector.get('short_title', 'UNKNOWN'),
user_connection_id), css="error")
locked_attributes = []
# Authentication
diff --git a/web/plugins/userdb/ldap.py b/web/plugins/userdb/ldap.py
index f0d080c..93b5433 100644
--- a/web/plugins/userdb/ldap.py
+++ b/web/plugins/userdb/ldap.py
@@ -959,7 +959,7 @@ def ldap_list_roles_with_group_dn():
ListOf(
LDAPDistinguishedName(
size = 80,
- enforce_suffix = ldap_replace_macros(g_config['group_dn']),
+ enforce_suffix = ldap_replace_macros(g_config.get('group_dn',
'')),
allow_empty = False,
),
title = role['alias'] + ' - ' + _("Specify the Group
DN"),