• Модуль: disk
  • Путь к файлу: ~/bitrix/modules/disk/lib/document/trackedobject.php
  • Класс: BitrixDiskDocumentTrackedObject
  • Вызов: TrackedObject::canRead
public function canRead(int $userId): bool
{
	if ($this->getFileId())
	{
		$file = $this->getFile();
		if (!$file)
		{
			return false;
		}

		$securityContext = $file->getStorage()->getSecurityContext($userId);
		if ($file->canRead($securityContext))
		{
			return true;
		}
	}

	$attachedObject = $this->getAttachedObject();
	if (!$attachedObject)
	{
		return false;
	}

	return $attachedObject->canRead($userId);
}