• Модуль: lists
  • Путь к файлу: ~/bitrix/modules/lists/classes/general/lists.php
  • Класс: CLists
  • Вызов: CLists::isWorkflowParticipant
static function isWorkflowParticipant($workflowId)
{
	global $USER;

	if ($USER->isAdmin() || $USER->canDoOperation("bitrix24_config"))
	{
		return true;
	}

	$userId = (int) $USER->getID();
	$participants = CBPTaskService::getWorkflowParticipants($workflowId);
	if (in_array($userId, $participants))
	{
		return true;
	}
	else
	{
		$state = CBPStateService::getWorkflowStateInfo($workflowId);
		if ($state && $userId === (int) $state['STARTED_BY'])
		{
			return true;
		}
	}

	return false;
}