fixed errors in massive copy modules

This commit is contained in:
daniel 2017-05-10 09:42:39 +02:00
parent 71f8f29107
commit 400fcdca26

View File

@ -17,13 +17,6 @@ global $config;
// Login check
check_login ();
if (! check_acl ($config['id_user'], 0, "LW")) {
db_pandora_audit("ACL Violation",
"Trying to access Alert Management");
require ("general/noaccess.php");
exit;
}
require_once ('include/functions_agents.php');
require_once ('include/functions_alerts.php');
$isFunctionPolicies = enterprise_include ('include/functions_policies.php');
@ -49,6 +42,13 @@ if ($get_agent_alerts_simple) {
return;
}
if (! check_acl ($config['id_user'], 0, "LW")) {
db_pandora_audit("ACL Violation",
"Trying to access Alert Management");
echo json_encode (false);
return;
}
require_once ('include/functions_agents.php');
require_once ('include/functions_alerts.php');
require_once ('include/functions_modules.php');
@ -73,6 +73,12 @@ if ($get_agent_alerts_simple) {
}
if ($enable_alert) {
if (! check_acl ($config['id_user'], 0, "LW")) {
db_pandora_audit("ACL Violation",
"Trying to access Alert Management");
return false;
}
$id_alert = (int) get_parameter ('id_alert');
$result = alerts_agent_module_disable ($id_alert, false);
@ -84,6 +90,11 @@ if ($enable_alert) {
}
if ($disable_alert) {
if (! check_acl ($config['id_user'], 0, "LW")) {
db_pandora_audit("ACL Violation",
"Trying to access Alert Management");
return false;
}
$id_alert = (int) get_parameter ('id_alert');
$result = alerts_agent_module_disable ($id_alert, true);
@ -95,6 +106,11 @@ if ($disable_alert) {
}
if ($get_actions_module) {
if (! check_acl ($config['id_user'], 0, "LW")) {
db_pandora_audit("ACL Violation",
"Trying to access Alert Management");
return false;
}
$id_module = get_parameter ('id_module');
if (empty($id_module))
@ -107,6 +123,11 @@ if ($get_actions_module) {
}
if ($show_update_action_menu) {
if (! check_acl ($config['id_user'], 0, "LW")) {
db_pandora_audit("ACL Violation",
"Trying to access Alert Management");
return false;
}
$id_agent_module = (int) get_parameter ('id_agent_module');
$id_module_action = (int) get_parameter ('id_module_action');
$id_agent = (int) get_parameter ('id_agent');