• Модуль: catalog
  • Путь к файлу: ~/bitrix/modules/catalog/lib/Access/Component/PermissionConfig.php
  • Класс: BitrixCatalogAccessComponentPermissionConfig
  • Вызов: PermissionConfig::getSections
private function getSections(bool $withInventoryManagmentSections): array
{
	$sections = [
		self::SECTION_CATALOG => $this->getCommonCatalogSection(),
	];

	if ($withInventoryManagmentSections)
	{
		$sections[self::SECTION_INVENTORY_MANAGMENT] = [
			PermissionDictionary::CATALOG_INVENTORY_MANAGEMENT_ACCESS,
			PermissionDictionary::CATALOG_STORE_MODIFY,
			PermissionDictionary::CATALOG_STORE_VIEW,
		];

		if (Loader::includeModule('report'))
		{
			$sections[self::SECTION_INVENTORY_MANAGMENT][] = PermissionDictionary::CATALOG_STORE_ANALYTIC_VIEW;
		}
		$sections[self::SECTION_INVENTORY_MANAGMENT][] = PermissionDictionary::CATALOG_SETTINGS_STORE_DOCUMENT_CARD_EDIT;

		foreach ($this->getStoreDocumentSectionCodesMap() as $code => $typeId)
		{
			$sections[$code] = $this->getStoreDocumentsSectionPermissions($typeId);
		}

		$reservationSection = $this->getReservationSection();
		if ($reservationSection)
		{
			$sections[self::SECTION_RESERVATION] = $reservationSection;
		}
	}

	$sections[self::SECTION_CATALOG_SETTINGS] = $this->getCatalogSettingsSection();
	$sections[self::SECTION_SETTINGS] = [
		PermissionDictionary::CATALOG_SETTINGS_ACCESS,
		PermissionDictionary::CATALOG_SETTINGS_EDIT_RIGHTS,
		PermissionDictionary::CATALOG_SETTINGS_SELL_NEGATIVE_COMMODITIES,
	];

	if ($withInventoryManagmentSections)
	{
		$sections[self::SECTION_RESERVATION][] = PermissionDictionary::CATALOG_RESERVE_SETTINGS;
	}

	return $sections;
}