From ff3b61e3af4177c8ac1a517c2029b9997bb2aa10 Mon Sep 17 00:00:00 2001 From: fermin831 Date: Fri, 12 Feb 2016 14:34:10 +0100 Subject: [PATCH] Modified ACL bit from AW to AD in scheduled downtimes TICKETS #3280 --- .../godmode/agentes/planned_downtime.list.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pandora_console/godmode/agentes/planned_downtime.list.php b/pandora_console/godmode/agentes/planned_downtime.list.php index 232ddbd819..5dc9234060 100755 --- a/pandora_console/godmode/agentes/planned_downtime.list.php +++ b/pandora_console/godmode/agentes/planned_downtime.list.php @@ -19,7 +19,7 @@ global $config; check_login(); $read_permisson = check_acl ($config['id_user'], 0, "AR"); -$write_permisson = check_acl ($config['id_user'], 0, "AW"); +$write_permisson = check_acl ($config['id_user'], 0, "AD"); if (! $read_permisson) { db_pandora_audit("ACL Violation", @@ -63,8 +63,8 @@ $stop_downtime = (bool) get_parameter ('stop_downtime'); if ($stop_downtime) { $downtime = db_get_row('tplanned_downtime', 'id', $id_downtime); - // Check AW permission on the downtime - if (empty($downtime) || ! check_acl ($config['id_user'], $downtime['id_group'], "AW")) { + // Check AD permission on the downtime + if (empty($downtime) || ! check_acl ($config['id_user'], $downtime['id_group'], "AD")) { db_pandora_audit("ACL Violation", "Trying to access downtime scheduler"); require ("general/noaccess.php"); @@ -86,8 +86,8 @@ $delete_downtime = (int) get_parameter ('delete_downtime'); if ($delete_downtime) { $downtime = db_get_row('tplanned_downtime', 'id', $id_downtime); - // Check AW permission on the downtime - if (empty($downtime) || ! check_acl ($config['id_user'], $downtime['id_group'], "AW")) { + // Check AD permission on the downtime + if (empty($downtime) || ! check_acl ($config['id_user'], $downtime['id_group'], "AD")) { db_pandora_audit("ACL Violation", "Trying to access downtime scheduler"); require ("general/noaccess.php"); @@ -375,9 +375,9 @@ else { ui_pagination($downtimes_number, "index.php?sec=estado&sec2=godmode/agentes/planned_downtime.list&$filter_params_str", $offset); - // User groups with AW permission - $groupsAW = users_get_groups($config['id_user'], 'AW'); - $groupsAW = array_keys($groupsAW); + // User groups with AD permission + $groupsAD = users_get_groups($config['id_user'], 'AD'); + $groupsAD = array_keys($groupsAD); // View available downtimes present in database (if any of them) $table = new StdClass(); @@ -445,7 +445,7 @@ else { } // If user have writting permissions - if (in_array($downtime['id_group'], $groupsAW)) { + if (in_array($downtime['id_group'], $groupsAD)) { // Stop button if ($downtime['type_execution'] == 'once' && $downtime["executed"] == 1) {