Module: check_mk
Branch: master
Commit: 438f086fb17757061ff1fe7a5003b78b7c6c31bd
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=438f086fb17757…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Nov 7 10:40:00 2014 +0100
#1494 FIX Fixed error in NagVis Maps snapin when some users had no contact groups
assigned
---
.werks/1494 | 10 ++++++++++
ChangeLog | 1 +
web/plugins/userdb/hook_auth.py | 2 +-
3 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/.werks/1494 b/.werks/1494
new file mode 100644
index 0000000..708bb2c
--- /dev/null
+++ b/.werks/1494
@@ -0,0 +1,10 @@
+Title: Fixed error in NagVis Maps snapin when some users had no contact groups assigned
+Level: 1
+Component: multisite
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.5i7
+Date: 1415353168
+
+
diff --git a/ChangeLog b/ChangeLog
index bcc24d6..1d10f66 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -37,6 +37,7 @@
* 1487 FIX: Fixed exception in Web GUI "Internal error:: name 'Filter'
is not defined" in manual setups (using setup.py)...
* 1488 FIX: Fixed wrong information showing up on "Host Group" and
"Service Group" views...
* 1433 FIX: Quicksearch: no longer shows an invalid search result when looking for
multiple hosts...
+ * 1494 FIX: Fixed error in NagVis Maps snapin when some users had no contact groups
assigned
WATO:
* 1170 Added buttons to move rules to top/bottom of the list to ruleset edit dialog
diff --git a/web/plugins/userdb/hook_auth.py b/web/plugins/userdb/hook_auth.py
index 0f2f70f..fc34447 100644
--- a/web/plugins/userdb/hook_auth.py
+++ b/web/plugins/userdb/hook_auth.py
@@ -142,7 +142,7 @@ function user_roles($username) {
function user_groups($username) {
global $mk_users;
- if(!isset($mk_users[$username]))
+ if(!isset($mk_users[$username]) ||
!isset($mk_users[$username]['contactgroups']))
return array();
else
return $mk_users[$username]['contactgroups'];