• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/classes/general/checklist.php
  • Класс: CCheckListTools
  • Вызов: CCheckListTools::AdminPolicyLevel
static function AdminPolicyLevel()
{
	$policy = CUser::getPolicy(1);

	$preset = PolicyRulesCollection::createByPreset(PolicyRulesCollection::PRESET_MIDDLE);
	if ($policy->compare($preset))
	{
		// middle preset is stronger than the current
		return 'low';
	}

	$preset = PolicyRulesCollection::createByPreset(PolicyRulesCollection::PRESET_HIGH);
	if ($policy->compare($preset))
	{
		// high preset is stronger than the current
		return 'middle';
	}

	return 'high';
}