diff --git a/pandora_console/general/logon_ok.php b/pandora_console/general/logon_ok.php index 920e4ace8e..df6fe6e86e 100644 --- a/pandora_console/general/logon_ok.php +++ b/pandora_console/general/logon_ok.php @@ -28,5 +28,22 @@ use PandoraFMS\TacticalView\GeneralTacticalView; + // Config functions. + require_once 'include/config.php'; + + // This solves problems in enterprise load. + global $config; + + check_login(); + // ACL Check. +if (check_acl($config['id_user'], 0, 'AR') === 0) { + db_pandora_audit( + AUDIT_LOG_ACL_VIOLATION, + 'Trying to access Default view' + ); + include 'general/noaccess.php'; + exit; +} + $tacticalView = new GeneralTacticalView(); $tacticalView->render(); diff --git a/pandora_console/operation/agentes/tactical.php b/pandora_console/operation/agentes/tactical.php index 45ce1554af..8dfabcd44f 100755 --- a/pandora_console/operation/agentes/tactical.php +++ b/pandora_console/operation/agentes/tactical.php @@ -29,5 +29,17 @@ // Begin. use PandoraFMS\TacticalView\GeneralTacticalView; +global $config; +check_login(); + +if (! check_acl($config['id_user'], 0, 'AR') && ! check_acl($config['id_user'], 0, 'AW')) { + db_pandora_audit( + AUDIT_LOG_ACL_VIOLATION, + 'Trying to access Agent view (Grouped)' + ); + include 'general/noaccess.php'; + return; +} + $tacticalView = new GeneralTacticalView(); $tacticalView->render();