• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/classes/general/elapseditem.php
  • Класс: CTaskElapsedItem
  • Вызов: CTaskElapsedItem::isActionAllowed
public function isActionAllowed($actionId)
{
	$isActionAllowed = false;
	CTaskAssert::assertLaxIntegers($actionId);
	$actionId = (int) $actionId;

	$isAdmin = CTasksTools::IsAdmin($this->executiveUserId)
		|| CTasksTools::IsPortalB24Admin($this->executiveUserId);

	if ($actionId === self::ACTION_ELAPSED_TIME_ADD)
		$isActionAllowed = $this->oTaskItem->checkAccess(ActionDictionary::ACTION_TASK_ELAPSED_TIME);
	elseif (($actionId === self::ACTION_ELAPSED_TIME_MODIFY) || ($actionId === self::ACTION_ELAPSED_TIME_REMOVE))
	{
		$arItemData = $this->getData($bEscape = false);
		if ($isAdmin || ($arItemData['USER_ID'] == $this->executiveUserId))
			$isActionAllowed = true;
	}

	return ($isActionAllowed);
}