Skip to content

Commit

Permalink
Fix asset business rules (Add is_itemgroup condition) (#18096)
Browse files Browse the repository at this point in the history
* Fix Debug LDAP Informations

* Fix AssetBusinessRules

* Fix not used code

* Fix CS

---------

Co-authored-by: Johan Cwiklinski <[email protected]>
  • Loading branch information
tsmr and trasher authored Oct 18, 2024
1 parent b9da5d9 commit 0644b93
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/CommonDBTM.php
Original file line number Diff line number Diff line change
Expand Up @@ -5762,7 +5762,13 @@ private function assetBusinessRules($condition)
$groups_user = $group_user->find(['users_id' => $input["users_id"]]);
$input['_groups_id_of_user'] = [];
foreach ($groups_user as $group) {
$input['_groups_id_of_user'][] = $group['groups_id'];
$item = new Group();
if (
$item->getFromDB($group['groups_id'])
&& $item->fields['is_itemgroup'] == 1
) {
$input['_groups_id_of_user'][] = $group['groups_id'];
}
}
$input['_locations_id_of_user'] = $user->fields['locations_id'];
$input['_default_groups_id_of_user'] = $user->fields['groups_id'];
Expand Down

0 comments on commit 0644b93

Please sign in to comment.