Skip to content

Commit

Permalink
fix(Item_DeviceXXX) restrict visibility even if not linked to an asset
Browse files Browse the repository at this point in the history
  • Loading branch information
stonebuzz authored and cedric-anne committed Sep 11, 2023
1 parent 943f612 commit 035db5c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Item_Devices.php
Original file line number Diff line number Diff line change
Expand Up @@ -802,6 +802,10 @@ public function getTableGroupCriteria($item, $peer_type = null)
]
];
$criteria['WHERE'] = $criteria['WHERE'] + getEntitiesRestrictCriteria(getTableForItemType($peer_type));
} else {
//peer_type not defined is related to Item_DeviceXXX without associated assets
//so restrict entity criteria to current Item_DeviceXXX
$criteria['WHERE'] = $criteria['WHERE'] + getEntitiesRestrictCriteria($ctable);
}
} else {
$fk = $this->getDeviceForeignKey();
Expand Down

0 comments on commit 035db5c

Please sign in to comment.