Class HasRoleFilter

All Implemented Interfaces:
Filter, FilterConfig, Serializable

public class HasRoleFilter extends AbstractAuthorizationFilter
Ensures the user has a given role.

When the user is not authorized, the default implementation will return a 403 Forbidden error when the user is authenticated but is missing the required role, and defers to the parent behavior otherwise.

This filter should be installed after the UserFilter as it relies on HttpServletRequest.isUserInRole(java.lang.String).

See Also: