if (request.getUser() == null || request.getUser() instanceof AnonymousUser) {
response = new SimpleHttpResponse("Login Required");
}
} else if (annotation instanceof RoleRequired) {
RoleRequired rr = (RoleRequired)annotation;
if (request.getUser() == null || request.getUser() instanceof AnonymousUser || !request.getUser().hasRole(rr.role())) {
response = new SimpleHttpResponse("Not Authorized");
}
}
}