• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/scrum/controllers/calendar.php
  • Класс: BitrixTasksScrumControllersCalendar
  • Вызов: Calendar::processBeforeAction
protected function processBeforeAction(Action $action)
{
	if (
		!Loader::includeModule('socialnetwork')
		|| !Loader::includeModule('calendar')
	)
	{
		$this->errorCollection->setError(
			new Error(
				Loc::getMessage('TASKS_CC_ERROR_INCLUDE_MODULE_ERROR'),
				self::ERROR_COULD_NOT_LOAD_MODULE
			)
		);

		return false;
	}

	$post = $this->request->getPostList()->toArray();

	$groupId = (is_numeric($post['groupId']) ? (int) $post['groupId'] : 0);
	$userId = User::getId();

	if (!Group::canReadGroupTasks($userId, $groupId))
	{
		$this->errorCollection->setError(
			new Error(
				Loc::getMessage('TASKS_CC_ERROR_ACCESS_DENIED'),
				self::ERROR_ACCESS_DENIED
			)
		);

		return false;
	}

	return parent::processBeforeAction($action);
}