Fixes on the ehorus integration ACL

This commit is contained in:
Alejandro Gallardo Escobar 2016-06-22 15:28:32 +02:00
parent 55fee7bf8f
commit b74267676d
3 changed files with 2 additions and 7 deletions

View File

@ -33,7 +33,7 @@ if (empty($agent_id)) {
$group_id = db_get_value('id_grupo', 'tagente', 'id_agente', $agent_id);
if ($group_id === false || (!check_acl($config['id_user'], $group_id, 'AM') && !is_user_admin($config['id_user']))) {
if ($group_id === false || (!check_acl($config['id_user'], $group_id, 'AW') && !is_user_admin($config['id_user']))) {
db_pandora_audit('ACL Violation', 'Trying to access eHorus');
require ('general/noaccess.php');
return;

View File

@ -22,11 +22,6 @@ 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');

View File

@ -926,7 +926,7 @@ if (enterprise_installed() && $config['log_collector']) {
/* eHorus tab */
if ($config['ehorus_enabled'] && !empty($config['ehorus_custom_field'])
&& (check_acl($config['id_user'], $id_grupo, 'AM') || is_user_admin($config['id_user']))) {
&& (check_acl($config['id_user'], $id_grupo, 'AW') || is_user_admin($config['id_user']))) {
$ehorus_agent_id = agents_get_agent_custom_field($id_agente, $config['ehorus_custom_field']);
if (!empty($ehorus_agent_id)) {
$tab_url = 'index.php?sec=estado&sec2=operation/agentes/ver_agente&tab=ehorus&id_agente='.$id_agente;