Module: check_mk
Branch: master
Commit: 9dcfe7b5bd842fd821b375664e03ac6f2faf2b9f
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9dcfe7b5bd842f…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Thu Oct 9 16:38:57 2014 +0200
#1124 FIX WATO EC configuration: no longer raises an exception when user has restricted
WATO access
An exception happened, when a user had restricted WATO permissions, but was allowed to
edit the WATO EC configuration.
The following role settings caused this error:<br>
<br>
<tt>WATO - Check_MK's Web Administration Tool -> Read access to all
modules.... -> No</tt><br>
and<br>
<tt>Event Console -> Configuration of event rules -> Yes</tt>
---
.werks/1124 | 14 ++++++++++++++
ChangeLog | 1 +
web/htdocs/wato.py | 4 +++-
3 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/.werks/1124 b/.werks/1124
new file mode 100644
index 0000000..f27ae7c
--- /dev/null
+++ b/.werks/1124
@@ -0,0 +1,14 @@
+Title: WATO EC configuration: no longer raises an exception when user has restricted WATO
access
+Level: 1
+Component: ec
+Compatible: compat
+Version: 1.2.5i6
+Date: 1412864930
+Class: fix
+
+An exception happened, when a user had restricted WATO permissions, but was allowed to
edit the WATO EC configuration.
+The following role settings caused this error:<br>
+<br>
+<tt>WATO - Check_MK's Web Administration Tool -> Read access to all
modules.... -> No</tt><br>
+and<br>
+<tt>Event Console -> Configuration of event rules -> Yes</tt>
diff --git a/ChangeLog b/ChangeLog
index 5bc5c41..b38b8cc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -156,6 +156,7 @@
* 1007 FIX: check_mkevents: fix case where events contain binary zeroes
* 1399 FIX: Fix left-over tac processes when showing Event Console history...
* 1402 FIX: Fixed cased where counting events did not reach required count...
+ * 1124 FIX: WATO EC configuration: no longer raises an exception when user has
restricted WATO access...
HW/SW-Inventory:
* 0643 windows inventory: OS now contains the install date, reg_uninstall now
contains the path...
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index a4cf757..b0fea5a 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -214,7 +214,9 @@ def page_handler():
# Check general permission for this mode
if modeperms != None and not config.may("wato.seeall"):
for pname in modeperms:
- config.need_permission("wato." + pname)
+ if '.' not in pname:
+ pname = "wato." + pname
+ config.need_permission(pname)
# Do actions (might switch mode)
action_message = None