• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/controller/timeline/comment.php
  • Класс: Bitrix\Crm\Controller\Timeline\Comment
  • Вызов: Comment::assertValidOwner
private function assertValidOwner(int $ownerId, int $ownerTypeId, bool $checkUpdatePermission = true): bool
{
	if ($ownerId <= 0 || !CCrmOwnerType::IsDefined($ownerTypeId))
	{
		$this->addError(ErrorCode::getOwnerNotFoundError());

		return false;
	}

	if (!$this->isAllowedAction($ownerTypeId, $ownerId, $checkUpdatePermission))
	{
		return false;
	}

	return true;
}