• Модуль: bizproc
  • Путь к файлу: ~/bitrix/modules/bizproc/lib/integration/ui/entityselector/templateprovider.php
  • Класс: BitrixBizprocIntegrationUIEntitySelectorTemplateProvider
  • Вызов: TemplateProvider::canUserStartWorkflow
protected function canUserStartWorkflow(int $userId, array $complexDocumentType): bool
{
	if ($this->isUserWorkflowTemplateAdmin($userId))
	{
		return true;
	}

	try
	{
		return CBPDocument::canUserOperateDocumentType(
			CBPCanUserOperateOperation::StartWorkflow,
			$userId,
			$complexDocumentType
		);
	}
	catch (CBPArgumentNullException $exception)
	{
		//return false;
	}

	return false;
}