Person person = userView.isPublicRequester() ? null : userView.getPerson();  if (functionality == null || functionality.isAvailable(context, person)) { setupRequest(servletRequest, context);
if (functionality == null || functionality.isAvailable(context)) { if (functionality != null) { logger.debug(String.format("%s[%d]%s", functionality.getName().getContent(), functionality.getIdInternal(), functionality.getMatchPath())); if (servletRequest.getQueryString() != null) { logger.debug("    " + servletRequest.getQueryString()); }  setupRequest(servletRequest, context); } else { if (servletRequest.getServletPath().matches("[^.]*\\.(jsp|do|faces).*") || servletRequest.getServletPath().matches("[^.]*")) { logger.debug("not mappped: " + servletRequest.getServletPath() + (servletRequest.getQueryString() != null ? "?" + servletRequest.getQueryString() : "")); } }
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)            throws IOException, ServletException {        HttpServletRequest servletRequest = (HttpServletRequest) request;        HttpServletResponse servletResponse = (HttpServletResponse) response;        IUserView userView = AccessControl.getUserView();        Functionality functionality = getFunctionality(servletRequest);        FunctionalityContext context = getContext(servletRequest, userView, functionality);        Person person = userView.isPublicRequester() ? null : userView.getPerson();        if (functionality == null || functionality.isAvailable(context, person)) {            setupRequest(servletRequest, context);            if (hasTestingPrefix(servletRequest)) {                removeTestingPrefix(servletRequest, servletResponse);            } else {                chain.doFilter(request, response);            }        } else {            showUnavailablePage(servletRequest, servletResponse);        }    }