private boolean shouldBlock()

in src/main/java/com/googlesource/gerrit/plugins/readonly/ReadOnly.java [82:96]


  private boolean shouldBlock(HttpServletRequest request) {
    String method = request.getMethod();
    String servletPath = request.getServletPath();
    for (String endpoint : endpoints) {
      if (servletPath.endsWith(endpoint)) {
        return false;
      }
    }
    return ("POST".equals(method)
            && !servletPath.endsWith(GIT_UPLOAD_PACK_PROTOCOL)
            && !servletPath.equals(LOGIN_PREFIX)
            && !servletPath.contains(LOGIN_INFIX))
        || "PUT".equals(method)
        || "DELETE".equals(method);
  }