A self-editor would now be seen by LoginStatusBean.isLoggedIn()

This commit is contained in:
j2blake 2011-04-20 17:36:14 +00:00
parent da7f10cd0a
commit 4d2806d8f1

View file

@ -27,9 +27,12 @@ public class SessionTimeoutLimitingFilter implements Filter {
/** Maximum inactive interval for a trivial session object, in seconds. */
private static final int TRIVIAL_SESSION_LIFETIME = 120;
@Override
public void init(FilterConfig filterConfig) throws ServletException {
// nothing to do here.
}
@Override
public void doFilter(ServletRequest servletRequest,
ServletResponse servletResponse, FilterChain filterChain)
throws IOException, ServletException {
@ -60,15 +63,12 @@ public class SessionTimeoutLimitingFilter implements Filter {
return;
}
// If self-editing, leave it alone.
if (VitroRequestPrep.isSelfEditing(request)) {
return;
}
// Otherwise, it's trivial, so shorten its life-span.
session.setMaxInactiveInterval(TRIVIAL_SESSION_LIFETIME);
}
@Override
public void destroy() {
// nothing to clean up.
}
}