diff --git a/pandora_console/godmode/groups/group_list.php b/pandora_console/godmode/groups/group_list.php index 66717bc35b..cbf92f59a0 100644 --- a/pandora_console/godmode/groups/group_list.php +++ b/pandora_console/godmode/groups/group_list.php @@ -560,13 +560,13 @@ if ($is_management_allowed === true && $update_group === true) { } } +$id_group = (int) get_parameter('id_group'); + // Delete group. if ($is_management_allowed === true && $delete_group === true - && ((bool) check_acl($config['id_user'], 0, 'PM') === true) + && ((bool) check_acl($config['id_user'], $id_group, 'PM') === true) ) { - $id_group = (int) get_parameter('id_group'); - $usedGroup = groups_check_used($id_group); if (!$usedGroup['return']) { diff --git a/pandora_console/include/class/Tree.class.php b/pandora_console/include/class/Tree.class.php index ed515dee87..7e75594a66 100644 --- a/pandora_console/include/class/Tree.class.php +++ b/pandora_console/include/class/Tree.class.php @@ -107,7 +107,7 @@ class Tree $userGroupsACL = users_get_groups(false, $this->access); - $this->userGroupsACL = empty($userGroupsACL) ? false : $userGroupsACL; + $this->userGroupsACL = empty($userGroupsACL) ? [0] : $userGroupsACL; $this->userGroups = $this->userGroupsACL; $this->userGroupsArray = array_keys($this->userGroups);