• Модуль: catalog
  • Путь к файлу: ~/bitrix/modules/catalog/lib/controller/documentcontractor.php
  • Класс: BitrixCatalogControllerDocumentContractor
  • Вызов: DocumentContractor::checkReadPermissionEntity
protected function checkReadPermissionEntity(): Result
{
	$result = $this->checkDocumentAccess(ActionDictionary::ACTION_STORE_DOCUMENT_VIEW);
	if (!$result->isSuccess())
	{
		return $result;
	}

	$canReadDocument =
		$this->accessController->check(Controller::CATALOG_STORE)
		&& $this->accessController->check(Controller::CATALOG_READ);

	if (!$canReadDocument)
	{
		$result->addError(new Error('Access denied'));
	}

	return $result;
}