Module: check_mk
Branch: master
Commit: 5c94dc28233f0d1eb92954bc76ec53a442af854a
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5c94dc28233f0d…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Oct 25 16:43:07 2018 +0200
Fixed subtile issue after removing star import
Change-Id: I10c361afd4b597c1a435b404870bd2eae6b07cd1
---
cmk/gui/userdb.py | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/cmk/gui/userdb.py b/cmk/gui/userdb.py
index 8bb2ef7..3cdb7c8 100644
--- a/cmk/gui/userdb.py
+++ b/cmk/gui/userdb.py
@@ -43,7 +43,7 @@ import cmk.gui.background_job as background_job
import cmk.gui.gui_background_job as gui_background_job
from cmk.gui.exceptions import MKUserError, MKInternalError
from cmk.gui.log import logger
-from cmk.gui.valuespec import DualListChoice
+from cmk.gui.valuespec import DualListChoice, TextAscii
import cmk.gui.i18n
from cmk.gui.i18n import _
from cmk.gui.globals import html
@@ -1114,7 +1114,13 @@ def update_config_based_user_attributes():
_clear_config_based_user_attributes()
for attr in config.wato_user_attrs:
- vs = globals()[attr['type']](title = attr['title'], help =
attr['help'])
+ if attr["type"] == "TextAscii":
+ vs = TextAscii(title = attr['title'], help = attr['help'])
+ else:
+ raise NotImplementedError()
+
+ # TODO: This method uses LegacyUserAttribute(). Use another class for
+ # this kind of attribute
declare_user_attribute(attr['name'], vs,
user_editable = attr['user_editable'],
show_in_table = attr.get('show_in_table', False),