• Модуль: rest
  • Путь к файлу: ~/bitrix/modules/rest/lib/api/placement.php
  • Класс: BitrixRestApiPlacement
  • Вызов: Placement::getScope
static function getScope(CRestServer $server)
{
	$result = array();

	$authData = $server->getAuthData();

	$scopeList = explode(',', $authData['scope']);

	$serviceDescription = $server->getServiceDescription();
	foreach($scopeList as $scope)
	{
		if(array_key_exists($scope, $serviceDescription))
		{
			$result[] = $scope;
		}
	}

	return $result;
}