mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-26 03:58:45 +02:00
🐛 N°6174 Fix attachments to host objects without org_id can not be downloaded from the portal (#303)
This commit is contained in:
@@ -1106,6 +1106,12 @@ class ObjectController extends BrickController
|
||||
$oAttachment = MetaModel::GetObject($sObjectClass, $sObjectId, true, true);
|
||||
$sHostClass = $oAttachment->Get('item_class');
|
||||
$sHostId = $oAttachment->Get('item_id');
|
||||
|
||||
// Attachments could be linked to host objects without an org_id. Retrieving the attachment would fail if enforced silos are based on org_id
|
||||
if($oAttachment->Get('item_org_id') === 0 && ($sHostId > 0) && $oSecurityHelper->IsActionAllowed(UR_ACTION_READ, $sHostClass, $sHostId)) {
|
||||
$bCheckSecurity = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user