• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/classes/general/task.php
  • Класс: CTasks
  • Вызов: CTasks::needAccessRestriction
static function needAccessRestriction(array $arFilter, $arParams)
{
	if (
		is_array($arParams)
		&& array_key_exists('USER_ID', $arParams)
		&& $arParams['USER_ID'] > 0
	)
	{
		$userId = (int)$arParams['USER_ID'];
	}
	else
	{
		$userId = User::getId();
	}

	return
		!User::isSuper($userId)
		&& ($arFilter['CHECK_PERMISSIONS'] ?? null) != 'N' // and not setted flag "skip permissions check"
		&& ($arFilter['SUBORDINATE_TASKS'] ?? null) != 'Y' // and not rights via subordination
	;
}