fixed minor error tree view acl
This commit is contained in:
parent
3d3670f6f9
commit
729fe74758
|
@ -278,7 +278,7 @@ class Tree {
|
||||||
: " AND $filter ";
|
: " AND $filter ";
|
||||||
}
|
}
|
||||||
|
|
||||||
static function getGroupAclCondition() {
|
public function getGroupAclCondition() {
|
||||||
if (users_can_manage_group_all("AR")) return "";
|
if (users_can_manage_group_all("AR")) return "";
|
||||||
|
|
||||||
$groups_str= implode(",", $this->userGroupsArray);
|
$groups_str= implode(",", $this->userGroupsArray);
|
||||||
|
|
|
@ -87,9 +87,9 @@ function groupview_get_modules_counters($groups_ids = false) {
|
||||||
return db_get_all_rows_sql($sql);
|
return db_get_all_rows_sql($sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
function groupview_get_all_counters() {
|
function groupview_get_all_counters($tree_group) {
|
||||||
$all_name = __("All");
|
$all_name = __("All");
|
||||||
$group_acl = Tree::getGroupAclCondition();
|
$group_acl = $tree_group->getGroupAclCondition();
|
||||||
$table = is_metaconsole() ? 'tmetaconsole_agent' : 'tagente';
|
$table = is_metaconsole() ? 'tmetaconsole_agent' : 'tagente';
|
||||||
$table_sec = is_metaconsole()
|
$table_sec = is_metaconsole()
|
||||||
? 'tmetaconsole_agent_secondary_group'
|
? 'tmetaconsole_agent_secondary_group'
|
||||||
|
@ -180,7 +180,7 @@ function groupview_get_groups_list($id_user = false, $access = 'AR', $is_not_pag
|
||||||
$list[$id_group]['_monitors_alerts_fired_'] = (int)$modules_counters[$id_group]['total_module_alerts'];
|
$list[$id_group]['_monitors_alerts_fired_'] = (int)$modules_counters[$id_group]['total_module_alerts'];
|
||||||
}
|
}
|
||||||
|
|
||||||
array_unshift($list, groupview_get_all_counters());
|
array_unshift($list, groupview_get_all_counters($tree_group));
|
||||||
return array(
|
return array(
|
||||||
'groups' => $list,
|
'groups' => $list,
|
||||||
'counter' => $counter
|
'counter' => $counter
|
||||||
|
|
Loading…
Reference in New Issue