mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-09-26 11:29:12 +02:00
Fixed secondary groups privileges in agent popup in tree view
This commit is contained in:
parent
c74e4a3d6a
commit
0747a5b263
@ -468,8 +468,6 @@ function treeview_printTable($id_agente, $server_data = array(), $no_head = fals
|
|||||||
enterprise_include_once ('meta/include/functions_ui_meta.php');
|
enterprise_include_once ('meta/include/functions_ui_meta.php');
|
||||||
include_graphs_dependencies();
|
include_graphs_dependencies();
|
||||||
|
|
||||||
$strict_user = (bool) db_get_value("strict_acl", "tusuario", "id_user", $config['id_user']);
|
|
||||||
|
|
||||||
$is_extra = enterprise_hook('policies_is_agent_extra_policy', array($id_agente));
|
$is_extra = enterprise_hook('policies_is_agent_extra_policy', array($id_agente));
|
||||||
|
|
||||||
if ($is_extra === ENTERPRISE_NOT_HOOK) {
|
if ($is_extra === ENTERPRISE_NOT_HOOK) {
|
||||||
@ -483,9 +481,13 @@ function treeview_printTable($id_agente, $server_data = array(), $no_head = fals
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get the agent info
|
||||||
$agent = db_get_row ("tagente", "id_agente", $id_agente);
|
$agent = db_get_row ("tagente", "id_agente", $id_agente);
|
||||||
|
if ($agent == false) return;
|
||||||
|
|
||||||
if (! check_acl ($config["id_user"], $agent["id_grupo"], "AR") && ! check_acl ($config["id_user"], $agent["id_grupo"], "AW") && !$is_extra) {
|
// Check all groups
|
||||||
|
$groups = agents_get_all_groups_agent($id_agente, $agent["id_grupo"], is_metaconsole());
|
||||||
|
if (! check_acl_one_of_groups ($config["id_user"], $groups, "AR") && ! check_acl_one_of_groups ($config["id_user"], $groups, "AW") && !$is_extra) {
|
||||||
db_pandora_audit("ACL Violation",
|
db_pandora_audit("ACL Violation",
|
||||||
"Trying to access Agent General Information");
|
"Trying to access Agent General Information");
|
||||||
require_once ("general/noaccess.php");
|
require_once ("general/noaccess.php");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user