Module: check_mk
Branch: master
Commit: d2cb583f97f18e1b87fb3a1f320cf8b8d1749248
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d2cb583f97f18e…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Sep 2 12:28:49 2014 +0200
Fix bug in contact group editor if no NagVis maps exist
---
web/htdocs/wato.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index a25e844..ef453c0 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -7909,7 +7909,7 @@ def mode_edit_group(phase, what):
)
if not new:
- permitted_maps = groups[name]['nagvis_maps']
+ permitted_maps = groups[name].get('nagvis_maps', [])
else:
permitted_maps = []
@@ -7980,7 +7980,8 @@ def mode_edit_group(phase, what):
alias = name
html.text_input("alias", alias)
- if edit_nagvis_map_permissions:
+ # Show permissions for NagVis maps if any of those exist
+ if edit_nagvis_map_permissions and get_nagvis_maps():
forms.header(_("Permissions"))
forms.section(_("Access to NagVis Maps"))
html.help(_("Configure access permissions to NagVis maps."))