/** @return boolean */ public function isGranted(RouteMatch $routeMatch) { $allowedRoles = $this->getAllowedRoles($routeMatch); if (!$allowedRoles) { return false; } if (in_array('*', $allowedRoles)) { return true; } $matchingRoles = array_intersect($allowedRoles, $this->identityProvider->getIdentity()->getRoles()); if (count($matchingRoles)) { return true; } return false; }
/** @return IdentityInterface */ public function getIdentity() { return $this->identityProvider->getIdentity(); }