#11095 Fix id_policy_module in url

This commit is contained in:
miguel angel rasteu 2023-05-04 09:43:48 +02:00
parent 151358190c
commit f3488e2aa4
1 changed files with 11 additions and 1 deletions

View File

@ -769,8 +769,18 @@ if ($modules !== false) {
} }
if (check_acl_one_of_groups($config['id_user'], $all_groups, 'AW') === true) { if (check_acl_one_of_groups($config['id_user'], $all_groups, 'AW') === true) {
if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK) {
$linked = policies_is_module_linked($module['id_agente_modulo']);
$adopt = policies_is_module_adopt($module['id_agente_modulo']);
if ($linked !== false && $adopt === false) {
$data[0] .= '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&tab=module&edit_module=1&id_agent_module='.$module['id_agente_modulo'].'&id_policy_module='.$module['id_policy_module'].'">';
} else {
$data[0] .= '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&tab=module&edit_module=1&id_agent_module='.$module['id_agente_modulo'].'">'; $data[0] .= '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&tab=module&edit_module=1&id_agent_module='.$module['id_agente_modulo'].'">';
} }
} else {
$data[0] .= '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&tab=module&edit_module=1&id_agent_module='.$module['id_agente_modulo'].'">';
}
}
if ((bool) $module['disabled'] === true) { if ((bool) $module['disabled'] === true) {
$dt_disabled_icon = ''; $dt_disabled_icon = '';