When you specifiy several roles une the @secure annotation an AND is done beetwen the roles.
It is more logical to do an OR as done int the JMS bundle because you can filter it in the controller function.
To do it you must change in the Lsw\SecureControllerBundle\Security\ControllerListener onKernelController function
if (!$this->securityContext->isGranted($role)) {
throw new AccessDeniedException(
'Current user is not granted required role "'.$role.'".'
);
}
}
by
if ($this->securityContext->isGranted($role)) return;
}
throw new AccessDeniedException('Current user is not granted');
When you specifiy several roles une the @secure annotation an AND is done beetwen the roles.
It is more logical to do an OR as done int the JMS bundle because you can filter it in the controller function.
To do it you must change in the Lsw\SecureControllerBundle\Security\ControllerListener onKernelController function
by