mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
Merge branch 'ent-2608-mas-problemas-de-vistas-de-grupos-secundarios' into 'develop'
Fixed agent popup with secondary groups privileges in tree view See merge request artica/pandorafms!1922
This commit is contained in:
commit
5694a16f74
@ -486,16 +486,22 @@ function treeview_printTable($id_agente, $server_data = array(), $no_head = fals
|
|||||||
if ($agent == false) return;
|
if ($agent == false) return;
|
||||||
|
|
||||||
// Check all groups
|
// Check all groups
|
||||||
$groups = agents_get_all_groups_agent($id_agente, $agent["id_grupo"], is_metaconsole());
|
$groups = agents_get_all_groups_agent($id_agente, $agent["id_grupo"]);
|
||||||
if (! check_acl_one_of_groups ($config["id_user"], $groups, "AR") && ! check_acl_one_of_groups ($config["id_user"], $groups, "AW") && !$is_extra) {
|
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");
|
||||||
|
if (!empty($server_data) && is_metaconsole()) {
|
||||||
|
metaconsole_restore_db();
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($agent === false) {
|
if ($agent === false) {
|
||||||
ui_print_error_message(__('There was a problem loading agent'));
|
ui_print_error_message(__('There was a problem loading agent'));
|
||||||
|
if (!empty($server_data) && is_metaconsole()) {
|
||||||
|
metaconsole_restore_db();
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user