$main =
$this->requestStack->
getMainRequest();
return (bool) $main?->attributes->
get(SalesChannelRequest::ATTRIBUTE_SALES_CHANNEL_MAINTENANCE
);
} private function isClientAllowed(Request
$request): bool
{ $main =
$this->requestStack->
getMainRequest();
$whitelist =
$main?->attributes->
get(SalesChannelRequest::ATTRIBUTE_SALES_CHANNEL_MAINTENANCE_IP_WHITLELIST
) ?? '';
/** @var string[] $allowedIps */
$allowedIps = Json::
decodeToList((string) $whitelist);
return $this->maintenanceModeResolver->
isClientAllowed($request,
$allowedIps);
}}