Module: check_mk
Branch: master
Commit: 5c14bd9e3d7def5495d837b5f60d07cd804c50b5
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5c14bd9e3d7def…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Jun 20 13:46:09 2017 +0200
4888 FIX Fixed missing link to "events of host" view for hosts the user may see
In the "all events" view, there are links on the host names to a view which
shows all events related to that host. In previous 1.4 versions these links
were broken when the user was not a contact of these hosts but permitted
to see the events of all hosts.
Change-Id: I8ffd3cba68413d87d92c2b62a85cfd0f617ff8a8
---
.werks/4888 | 14 ++++++++++++++
web/plugins/views/mkeventd.py | 4 ++--
2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/.werks/4888 b/.werks/4888
new file mode 100644
index 0000000..4024d5b
--- /dev/null
+++ b/.werks/4888
@@ -0,0 +1,14 @@
+Title: Fixed missing link to "events of host" view for hosts the user may see
+Level: 1
+Component: ec
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.5.0i1
+Date: 1497959040
+
+In the "all events" view, there are links on the host names to a view which
+shows all events related to that host. In previous 1.4 versions these links
+were broken when the user was not a contact of these hosts but permitted
+to see the events of all hosts.
diff --git a/web/plugins/views/mkeventd.py b/web/plugins/views/mkeventd.py
index 0977063..fa769b6 100644
--- a/web/plugins/views/mkeventd.py
+++ b/web/plugins/views/mkeventd.py
@@ -75,8 +75,8 @@ def query_ec_table(datasource, columns, add_columns, query, only_sites,
limit, t
# the "mkeventd.seeall" permissions. So it is simply not possible to do this
on
# core level at the moment.
def _ec_filter_host_information_of_not_permitted_hosts(rows):
- if not config.user.may("mkeventd.seeall"):
- return
+ if config.user.may("mkeventd.seeall"):
+ return # Don't remove anything. The user may see everything
user_groups = set(config.user.contact_groups())