[checkmk-commits] Check_MK Git: check_mk: ldap: Added short titles to connectors

git version control git at mathias-kettner.de
Wed Nov 21 14:35:07 CET 2012


Module: check_mk
Branch: master
Commit: fab2f6952f257c910e7216627a5cd359a70c378e
URL:    http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=fab2f6952f257c910e7216627a5cd359a70c378e

Author: Lars Michelsen <lm at mathias-kettner.de>
Date:   Fri Nov 16 15:22:29 2012 +0100

ldap: Added short titles to connectors

---

 web/htdocs/valuespec.py        |    6 ++++++
 web/htdocs/wato.py             |    2 +-
 web/plugins/userdb/htpasswd.py |    5 +++--
 web/plugins/userdb/ldap.py     |    5 +++--
 4 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/web/htdocs/valuespec.py b/web/htdocs/valuespec.py
index 2f5a680..7d886a9 100644
--- a/web/htdocs/valuespec.py
+++ b/web/htdocs/valuespec.py
@@ -2144,3 +2144,9 @@ class Password(TextAscii):
             html.write(self._label)
             html.write(" ")
         html.password_input(varprefix, str(value), size = self._size)
+
+    def value_to_text(self, value):
+        if value == None:
+            return _("none")
+        else:
+            return '******'
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 1bcd017..876d349 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -7823,7 +7823,7 @@ def mode_users(phase):
 
         # Connector
         if connector:
-            html.write("<td>%s</td>" % connector['title'])
+            html.write("<td>%s</td>" % connector['short_title'])
             locked_attributes = userdb.locked_attributes(user.get('connector'))
         else:
             html.write("<td class=error>%s (disabled)</td>" % userdb.get_connector_id(user.get('connector')))
diff --git a/web/plugins/userdb/htpasswd.py b/web/plugins/userdb/htpasswd.py
index 1044e88..95e5a88 100644
--- a/web/plugins/userdb/htpasswd.py
+++ b/web/plugins/userdb/htpasswd.py
@@ -111,8 +111,9 @@ def htpasswd_save(users):
             out.write("%s:%s%s\n" % (id, locksym, user["password"]))
 
 multisite_user_connectors.append({
-    'id':    'htpasswd',
-    'title': _('htpasswd'),
+    'id':          'htpasswd',
+    'title':       _('Apache Local Password File (htpasswd)'),
+    'short_title': _('htpasswd'),
 
     # Register hook functions
     'login': htpasswd_login,
diff --git a/web/plugins/userdb/ldap.py b/web/plugins/userdb/ldap.py
index 6488a7f..a771ccb 100644
--- a/web/plugins/userdb/ldap.py
+++ b/web/plugins/userdb/ldap.py
@@ -515,8 +515,9 @@ def ldap_page():
     ldap_sync(False, None)
 
 multisite_user_connectors.append({
-    'id':    'ldap',
-    'title': _('LDAP (AD, OpenLDAP)'),
+    'id':          'ldap',
+    'title':       _('LDAP (Active Directory, OpenLDAP)'),
+    'short_title': _('LDAP'),
 
     'login':             ldap_login,
     'sync':              ldap_sync,



More information about the checkmk-commits mailing list