public function hasAccess(UserInterface $user, string $permission) : bool
    {
        return $this->provider->hasRolePermission($user->getRole(), $permission);
    }
public function hasAccess(UserInterface $user, string $permission) : bool
    {
        return $this->provider->hasRolePermission($user->getRole(), $permission);
    }
public function hasAccess ( UserInterface $ user , string $ permission ) : bool { return $ this -> provider -> hasRolePermission ( $ user -> getRole ( ) , $ permission ) ; }
Does the given user have access to the provided permission

@param UserInterface $user
@param string $permission
@return bool
Does the given user have access to the provided permission