• Модуль: bizproc
  • Путь к файлу: ~/bitrix/modules/bizproc/lib/controller/fieldtype.php
  • Класс: BitrixBizprocControllerFieldType
  • Вызов: FieldType::inputAndAccessCheck
protected function inputAndAccessCheck(array &$documentType, array &$type): bool
{
	$operationParameters = [];

	if (isset($documentType[3]))
	{
		$operationParameters['DocumentCategoryId'] = $documentType[3];
	}

	$documentType = CBPHelper::ParseDocumentId($documentType);
	$type = BizprocFieldType::normalizeProperty($type);

	$user = $this->getCurrentUser();

	if (
		!$user->isAdmin()
		&& !CBPDocument::CanUserOperateDocumentType(
			CBPCanUserOperateOperation::ViewWorkflow,
			$user->getId(),
			$documentType,
			$operationParameters
		)
	)
	{
		$this->addError(new Error(Loc::getMessage('BIZPROC_ACCESS_DENIED')));

		return false;
	}

	return true;
}