Skip to content

Commit

Permalink
fix(dropdownfield): incomplete group restriction
Browse files Browse the repository at this point in the history
  • Loading branch information
btry committed Feb 19, 2024
1 parent 8bc96d3 commit eebcc21
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion inc/field/dropdownfield.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -594,8 +594,9 @@ private function getMyGroups($userID) {
if ($result->count() === 0) {
return [];
}
$a_groups = [];
foreach ($result as $data) {
$a_groups = $dbUtil->getAncestorsOf("glpi_groups", $data["groups_id"]);
$a_groups = $a_groups + $dbUtil->getAncestorsOf("glpi_groups", $data["groups_id"]);
$a_groups[$data["groups_id"]] = $data["groups_id"];
}
return $a_groups;
Expand Down

0 comments on commit eebcc21

Please sign in to comment.