• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/FileUploader/EntityController.php
  • Класс: Bitrix\Crm\FileUploader\EntityController
  • Вызов: EntityController::canUpload
public function canUpload(): bool
{
	[
		'entityTypeId' => $entityTypeId,
		'entityId' => $entityId,
		'categoryId' => $categoryId,
	] = $this->getOptions();

	if ($entityId)
	{
		return $this->userPermissions->checkUpdatePermissions($entityTypeId, $entityId, $categoryId);
	}

	return $this->userPermissions->checkAddPermissions($entityTypeId, $categoryId);
}