Module: check_mk
Branch: master
Commit: b22e1fd423892da497a182a544efeade27b1409c
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b22e1fd423892d…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Jan 21 15:41:16 2013 +0100
Fixed problem on user profile page when no alias set for a user
---
ChangeLog | 2 ++
web/htdocs/wato.py | 2 +-
web/plugins/userdb/ldap.py | 4 ++--
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 378b33e..529fa72 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,8 @@
WATO:
* Added hr_mem check to the memory checkgroup to make it configurable in WATO
+ * Fixed some typos in ldap error messages
+ * Fixed problem on user profile page when no alias set for a user
1.2.1i5:
Core:
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index fae9b2c..f5da593 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -10947,7 +10947,7 @@ def page_user_profile():
forms.header(_("Personal Settings"))
forms.section(_("Name"), simple=True)
- html.write(user["alias"])
+ html.write(user.get("alias", config.user_id))
if config.may('general.change_password') and not
is_locked('password'):
forms.section(_("Password"))
diff --git a/web/plugins/userdb/ldap.py b/web/plugins/userdb/ldap.py
index 86eb6b2..af09db0 100644
--- a/web/plugins/userdb/ldap.py
+++ b/web/plugins/userdb/ldap.py
@@ -159,7 +159,7 @@ def ldap_default_bind():
ldap_bind('', '', catch = False) # anonymous bind
except (ldap.INVALID_CREDENTIALS, ldap.INAPPROPRIATE_AUTH):
raise MKLDAPException(_('Unable to connect to LDAP server with the configured
bind credentials. '
- 'Plase fix this in the '
+ 'Please fix this in the '
'<a
href="wato.py?mode=edit_configvar&varname=ldap_connection">LDAP '
'connection settings</a>.'))
@@ -423,7 +423,7 @@ ldap_attribute_plugins['alias'] = {
def ldap_convert_auth_expire(params, user_id, ldap_user, user):
changed_attr = params.get('attr', ldap_attr('pw_changed'))
if not changed_attr in ldap_user:
- raise MKLDAPException(_('The "Authentication Expiration" attribute
(%s) could not be fetched'
+ raise MKLDAPException(_('The "Authentication Expiration" attribute
(%s) could not be fetched '
'from the LDAP server for user %s.') %
(changed_attr, ldap_user))
# For keeping this thing simple, we don't parse the date here. We just store