Module: check_mk
Branch: master
Commit: a329505a836cf1f130571924a12c93a239477b8d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a329505a836cf1…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Jan 8 08:57:02 2013 +0100
WatoUserselection: allow none
---
web/htdocs/wato.py | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index cfc8058..334ea6d 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -8245,10 +8245,13 @@ def filter_hidden_users(users):
class UserSelection(ElementSelection):
def __init__(self, **kwargs):
ElementSelection.__init__(self, **kwargs)
+ self._none = kwargs.get("none")
def get_elements(self):
users = filter_hidden_users(userdb.load_users())
elements = dict([ (name, "%s - %s" % (name, us.get("alias",
name))) for (name, us) in users.items() ])
+ if self._none:
+ elements[None] = self._none
return elements
def value_to_text(self, value):