Skip to content

Instantly share code, notes, and snippets.

@pniederlag
Created June 24, 2011 06:47
Show Gist options
  • Save pniederlag/1044341 to your computer and use it in GitHub Desktop.
Save pniederlag/1044341 to your computer and use it in GitHub Desktop.
gerrit: enable anon access with HTTP auth
diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/Gerrit.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/Gerrit.java
index d0e5192..0b6605f 100644
--- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/Gerrit.java
+++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/Gerrit.java
@@ -492,6 +492,13 @@ public class Gerrit implements EntryPoint {
switch (cfg.getAuthType()) {
case HTTP:
case HTTP_LDAP:
+ menuRight.addItem(C.menuSignIn(), new Command() {
+ public void execute() {
+ doSignIn(History.getToken());
+ }
+ });
+ break;
+
case CLIENT_SSL_CERT_LDAP:
break;
diff --git a/gerrit-httpd/src/main/java/com/google/gerrit/httpd/auth/container/HttpAuthModule.java b/gerrit-httpd/src/main/java/com/google/gerrit/httpd/auth/container/HttpAuthModule.java
index 553b1f4..dff5538 100644
--- a/gerrit-httpd/src/main/java/com/google/gerrit/httpd/auth/container/HttpAuthModule.java
+++ b/gerrit-httpd/src/main/java/com/google/gerrit/httpd/auth/container/HttpAuthModule.java
@@ -20,7 +20,7 @@ import com.google.inject.servlet.ServletModule;
public class HttpAuthModule extends ServletModule {
@Override
protected void configureServlets() {
- filter("/").through(HttpAuthFilter.class);
+ // filter("/").through(HttpAuthFilter.class);
serve("/login/*").with(HttpLoginServlet.class);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment