Module: check_mk
Branch: master
Commit: cd2ff8bbacc78a5bbff8b6f2978177fb66d404ac
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=cd2ff8bbacc78a…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Sun May 6 12:46:13 2012 +0200
honor folder-permissions when creating, deleting and modifiying rules
---
.bugs/612 | 7 +++++--
ChangeLog | 1 +
web/htdocs/wato.py | 5 +++++
3 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/.bugs/612 b/.bugs/612
index d02182d..b990220 100644
--- a/.bugs/612
+++ b/.bugs/612
@@ -1,9 +1,12 @@
Title: Wato: Berechitungen bei Rulsets
Component: wato
-State: open
+Class: bug
+State: done
Date: 2012-04-30 17:05:42
Targetversion: 1.1.12
-Class: bug
Wird die berechtigung auf eines Ordners / Main Directory auf einen Contact Group
eingeschränkt,
können user auch ohne in der Gruppe zu sein dort Regel anlegen und löschen
+
+2012-05-06 12:45:58: changed state open -> done
+Fixed.
diff --git a/ChangeLog b/ChangeLog
index ef5280b..7fc7250 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
1.2.0b4:
WATO:
* ps and ps.perf configurable via WATO now (without inventory)
+ * FIX: honor folder-permissions when creating, deleting and modifiying rules
Multisite:
* FIX: fixed filter of recent event views (4 hours didn't catch)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 1f3892c..49cb264 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -9319,6 +9319,7 @@ def mode_edit_ruleset(phase):
elif phase == "action":
# Folder for the rule actions is defined by _folder
rule_folder = g_folders[html.var("_folder",
html.var("folder"))]
+ check_folder_permissions(rule_folder, "write", True)
rulesets = load_rulesets(rule_folder)
rules = rulesets.get(varname, [])
@@ -9865,6 +9866,10 @@ def mode_edit_rule(phase):
tag_specs, host_list, item_list = get_rule_conditions(rulespec)
new_rule_folder = g_folders[html.var("new_rule_folder")]
+ # Check permissions on folders
+ check_folder_permissions(folder, "write", True)
+ check_folder_permissions(new_rule_folder, "write", True)
+
# VALUE
if valuespec:
value = get_edited_value(valuespec)