• Модуль: landing
  • Путь к файлу: ~/bitrix/modules/landing/lib/site/scope/group.php
  • Класс: BitrixLandingSiteScopeGroup
  • Вызов: Group::getOperationsForSite
static function getOperationsForSite(int $siteId): array
{
	static $cache = [];

	if (!array_key_exists($siteId, $cache))
	{
		$groupId = self::getGroupIdBySiteId($siteId) ?: 0;
		$cache[$siteId] = [
			'read' => false,//see below
			'edit' => SocialNetwork::canPerformOperation($groupId, Rights::ACCESS_TYPES['edit']),
			'sett' => SocialNetwork::canPerformOperation($groupId, Rights::ACCESS_TYPES['sett']),
			'delete' => SocialNetwork::canPerformOperation($groupId, Rights::ACCESS_TYPES['delete']),
		];

		if (array_sum($cache[$siteId]))
		{
			$cache[$siteId]['read'] = true;
		}
	}

	return $cache[$siteId];
}