Class CanUseFilter

  extended by com.atlassian.core.filters.AbstractHttpFilter
      extended by
All Implemented Interfaces:

public class CanUseFilter
extends com.atlassian.core.filters.AbstractHttpFilter

A filter which checks if the current user is permitted to use Confluence.

If the request comes from the anonymous user and they are not permitted then a 401 error will be returned. If the request comes from an authenticated user and they are not permitted then a 403 error will be returned. This difference allows a client to perhaps offer an authentication mechanism to the anonymous user before a retry.

If the request is permitted then this filter does nothing.

Constructor Summary
CanUseFilter(PermissionManager permissionManager)
Method Summary
protected  void doFilter(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain filterChain)
Methods inherited from class com.atlassian.core.filters.AbstractHttpFilter
destroy, doFilter, init
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public CanUseFilter(PermissionManager permissionManager)
Method Detail


protected void doFilter(javax.servlet.http.HttpServletRequest request,
                        javax.servlet.http.HttpServletResponse response,
                        javax.servlet.FilterChain filterChain)
Specified by:
doFilter in class com.atlassian.core.filters.AbstractHttpFilter

Copyright © 2003-2014 Atlassian. All Rights Reserved.