Module: check_mk
Branch: master
Commit: ec5872b98ca1711c250785649c9076c3aed1f213
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ec5872b98ca171…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Thu Sep 25 12:13:54 2014 +0200
#1119 FIX WATO create rule: No longer raises an incorrect permission warning when creating
a new rule
A normal monitoring user which had only permissions to a given subfolder
could not create a new rule when the rule formular was created with the
main directory as rule path.<br><br>
For example, if the user pressed "Create in folder: 'Main directory'"
and
switched the actual rule folder to his subfolder afterwards.<br>
This resulted in a permission warning stating that the user has no permission to
write into the 'Main directory'.
---
.werks/1119 | 16 ++++++++++++++++
ChangeLog | 1 +
web/htdocs/wato.py | 3 ++-
3 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/.werks/1119 b/.werks/1119
new file mode 100644
index 0000000..8b76c4b
--- /dev/null
+++ b/.werks/1119
@@ -0,0 +1,16 @@
+Title: WATO create rule: No longer raises an incorrect permission warning when creating a
new rule
+Level: 1
+Component: wato
+Compatible: compat
+Version: 1.2.5i6
+Date: 1411639616
+Class: fix
+
+A normal monitoring user which had only permissions to a given subfolder
+could not create a new rule when the rule formular was created with the
+main directory as rule path.<br><br>
+
+For example, if the user pressed "Create in folder: 'Main directory'"
and
+switched the actual rule folder to his subfolder afterwards.<br>
+This resulted in a permission warning stating that the user has no permission to
+write into the 'Main directory'.
diff --git a/ChangeLog b/ChangeLog
index 49e9399..e7fe90d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -127,6 +127,7 @@
* 1101 FIX: WATO check parameter: renamed 'Nominal Voltages' to 'Voltage
Levels..'
* 1396 FIX: Fix default setting of Enable sounds in views...
* 1109 FIX: WATO active checks: passwords no longer shown as plain text....
+ * 1119 FIX: WATO create rule: No longer raises an incorrect permission warning when
creating a new rule...
Notifications:
* 1151 Add variables (HOST/SERVICE)ACK(AUTHOR/COMMENT) to notification context...
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index afab772..12088e8 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -14291,7 +14291,8 @@ def mode_edit_rule(phase, new = False):
new_rule_folder = g_folders[html.var("new_rule_folder")]
# Check permissions on folders
- check_folder_permissions(folder, "write", True)
+ if not new:
+ check_folder_permissions(folder, "write", True)
check_folder_permissions(new_rule_folder, "write", True)
# VALUE