public function setUserRoles(Request $request): bool | public function setUserRoles(Request $request): bool | ||||
{ | { | ||||
if ($this->tokenStorage && $this->tokenStorage->getToken()) { | |||||
if (!$this->merchantResolver->isOutOfMerchant() && $this->tokenStorage && $this->tokenStorage->getToken()) { | |||||
$token = $this->tokenStorage->getToken(); | $token = $this->tokenStorage->getToken(); | ||||
$sessionUser = $token->getUser(); | $sessionUser = $token->getUser(); | ||||