Fix ACL grous AW creation

This commit is contained in:
Calvo 2021-11-05 15:21:04 +01:00
parent 6081384ef9
commit 61bdc1f4e0
2 changed files with 8 additions and 0 deletions

View File

@ -341,6 +341,7 @@ if (isset($groups[$grupo]) || $new_agent) {
'selected' => $grupo,
'return' => true,
'required' => true,
'privilege' => 'AW',
]
);
} else {

View File

@ -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');