diff --git a/pandora_console/operation/agentes/ehorus.php b/pandora_console/operation/agentes/ehorus.php index 0e86b10967..99dbdcae23 100644 --- a/pandora_console/operation/agentes/ehorus.php +++ b/pandora_console/operation/agentes/ehorus.php @@ -18,9 +18,9 @@ global $config; check_login (); -if (! check_acl ($config['id_user'], 0, "AR") && ! is_user_admin ($config['id_user'])) { - db_pandora_audit("ACL Violation", "Trying to access eHorus"); - require ("general/noaccess.php"); +if (! check_acl ($config['id_user'], 0, 'AM') && ! is_user_admin ($config['id_user'])) { + db_pandora_audit('ACL Violation', 'Trying to access eHorus'); + require ('general/noaccess.php'); return; } @@ -175,10 +175,15 @@ $client_url = $config['homeurl'] . 'operation/agentes/ehorus_client.php?' . $que } } + var heightCorrection = 20; + var createIframe = function (node, src) { var iframe = document.createElement('iframe'); iframe.src = src; iframe.style.border = 'none'; + iframe.style.position = 'relative'; + iframe.style.top = '-' + heightCorrection + 'px'; + iframe.style.border = 'none'; resizeIframe(iframe); node.appendChild(iframe); @@ -189,7 +194,7 @@ $client_url = $config['homeurl'] . 'operation/agentes/ehorus_client.php?' . $que var $elem = $('div#ehorus-client-iframe'); return { width: $elem.width(), - height: $(window).height() - $elem.offset().top - 20 + height: $(window).height() - $elem.offset().top + heightCorrection } } var resizeIframe = function (iframe) { diff --git a/pandora_console/operation/agentes/ehorus_client.php b/pandora_console/operation/agentes/ehorus_client.php index 0629ea4704..0e52e46cc2 100644 --- a/pandora_console/operation/agentes/ehorus_client.php +++ b/pandora_console/operation/agentes/ehorus_client.php @@ -22,6 +22,11 @@ if (! isset($_SESSION['id_usuario'])) { require_once ('../../include/config.php'); require_once ($config['homedir'] . '/include/functions.php'); +if (! check_acl($config['id_user'], 0, 'AM') && !is_user_admin($config['id_user'])) { + db_pandora_audit('ACL Violation', 'Trying to access eHorus'); + return; +} + check_login(); $agent_id = (string) get_parameter_get('agent_id');