public boolean isAvailable()

in server/src/jetbrains/buildServer/staticUIExtensions/web/RulePageExtension.java [61:76]


  public boolean isAvailable(@NotNull HttpServletRequest request) {
    if (!super.isAvailable(request)) return false;

    // consider using WebUtil.getOriginalRequestUrl since 8.1

    //TeamCity 8.0 compatible version:
//    String pathToMatch = WebUtil.getPathWithoutAuthenticationType(WebUtil.getPathWithoutContext(request, WebUtil.getRequestUrl(request).replace(".jsp", ".html")));

    //TeamCity 7.0 compatible version:
    String pathToMatch = WebUtil.getPathWithoutAuthenticationType(WebUtil.getPathWithoutContext(request, getRequestUrl(request).replace(".jsp", ".html")));

    if (pathToMatch.startsWith("/"))
      pathToMatch = pathToMatch.substring(1);

    return myRule.getUrlMatcher().matches(pathToMatch);
  }