From 9f0e43623b4dbb6b846fd11be0e54b2e63685063 Mon Sep 17 00:00:00 2001 From: Fermin Date: Wed, 31 Oct 2018 16:16:32 +0100 Subject: [PATCH] Fixed agent popup with secondary groups privileges in tree view --- pandora_console/include/functions_treeview.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pandora_console/include/functions_treeview.php b/pandora_console/include/functions_treeview.php index fb3305c323..88b9241031 100755 --- a/pandora_console/include/functions_treeview.php +++ b/pandora_console/include/functions_treeview.php @@ -486,16 +486,22 @@ function treeview_printTable($id_agente, $server_data = array(), $no_head = fals if ($agent == false) return; // 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) { db_pandora_audit("ACL Violation", "Trying to access Agent General Information"); require_once ("general/noaccess.php"); + if (!empty($server_data) && is_metaconsole()) { + metaconsole_restore_db(); + } return; } if ($agent === false) { ui_print_error_message(__('There was a problem loading agent')); + if (!empty($server_data) && is_metaconsole()) { + metaconsole_restore_db(); + } return; }