• Модуль: im
  • Путь к файлу: ~/bitrix/modules/im/lib/V2/Import/ImportSendingService.php
  • Класс: BitrixImV2ImportImportSendingService
  • Вызов: ImportSendingService::checkFileAccess
private function checkFileAccess(array $message): Result
{
	$result = new Result();

	if (!isset($message['file']))
	{
		return $result->addError(new ImportError(ImportError::FILE_NOT_FOUND));
	}
	if ((int)$message['file']->getParentId() !== (int)$this->chat['DISK_FOLDER_ID'])
	{
		return $result->addError(new ImportError(ImportError::FILE_ACCESS_ERROR));
	}

	return $result;
}