Module: check_mk
Branch: master
Commit: 9ae7fb1f18c21240d8a3e4f22cba8fb6b735c1bf
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9ae7fb1f18c212…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Jan 3 09:57:40 2013 +0100
FIX: Sidebar not raising exceptions on configured but not available snapins
---
ChangeLog | 1 +
web/htdocs/sidebar.py | 6 +++++-
2 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 9d3eb83..a19f579 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -70,6 +70,7 @@
* FIX: handle ldap logins with ',' in distinguished name
* FIX: quote HTML variable names, fixes potential JS injection
* Option dials (refresh, number of columns) now turnable by mouse wheel
+ * FIX: Sidebar not raising exceptions on configured but not available snapins
WATO:
* FIX: Fixed generated manual check definitions for checks without items
diff --git a/web/htdocs/sidebar.py b/web/htdocs/sidebar.py
index e4cb533..fbfed65 100644
--- a/web/htdocs/sidebar.py
+++ b/web/htdocs/sidebar.py
@@ -116,7 +116,11 @@ def load_user_config():
user_config = config.sidebar
# Remove entries the user is not allowed for or which have state "off"
(from legacy version)
- return [ entry for entry in user_config if entry[1] != "off" and
config.may("sidesnap." + entry[0])]
+ # silently skip configured but not existant snapins
+ return [ entry for entry in user_config
+ if entry[0] in sidebar_snapins
+ and entry[1] != "off"
+ and config.may("sidesnap." + entry[0])]
def save_user_config(user_config):
if config.may("general.configure_sidebar"):