diff --git a/pandora_console/godmode/agentes/agent_manager.php b/pandora_console/godmode/agentes/agent_manager.php index fe39fca203..23a0e401d5 100644 --- a/pandora_console/godmode/agentes/agent_manager.php +++ b/pandora_console/godmode/agentes/agent_manager.php @@ -341,6 +341,7 @@ if (isset($groups[$grupo]) || $new_agent) { 'selected' => $grupo, 'return' => true, 'required' => true, + 'privilege' => 'AW', ] ); } else { diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index ec8e70a82c..7383ba4506 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -196,6 +196,13 @@ if ($create_agent) { $nombre_agente = hash('sha256', $alias.'|'.$direccion_agente.'|'.time().'|'.sprintf('%04d', rand(0, 10000))); $grupo = (int) get_parameter_post('grupo'); + + if ((bool) check_acl($config['id_user'], $grupo, 'AW') === false) { + db_pandora_audit('ACL Violation', 'Trying to access agent manager'); + include $config['homedir'].'/general/noaccess.php'; + return; + } + $intervalo = (string) get_parameter_post('intervalo', SECONDS_5MINUTES); $comentarios = (string) get_parameter_post('comentarios', ''); $modo = (int) get_parameter_post('modo');