if (user != null) {
request.setAttribute(AUTHENTICATED_ATTRIBUTE, Boolean.TRUE);
logIn(request, response, user);
ForwardingDatabase db = new ForwardingDatabase() {
@Override
protected <T> Query<T> filterQuery(Query<T> query) {
return query.clone().master().resolveInvisible();
}
};
db.setDelegate(Database.Static.getDefault());
Database.Static.setIgnoreReadConnection(true);
Database.Static.overrideDefault(db);
request.setAttribute(DATABASE_OVERRIDDEN_ATTRIBUTE, Boolean.TRUE);
} else if (!JspUtils.getEmbeddedServletPath(context, request.getServletPath()).equals(LOG_IN_PATH)) {