HttpSession session = request.getSession();
User user = (User) session.getAttribute(Constants.USER_KEY);
if (user == null) {
try {
response.sendError(403, "User not logged in");
} catch (IOException e) {
log.error("Unable to send response");
}
return false;
}
return true;