Remove references to isGitBasicAuth in GWT UI

Change-Id: I45c60597e636918eaecfa57bc4c9be11bf2110bf
This commit is contained in:
David Pursehouse
2017-03-01 17:48:33 +09:00
parent cdc381ea72
commit b2ccfb276a
3 changed files with 3 additions and 10 deletions

View File

@@ -81,10 +81,7 @@ public class AuthInfo extends JavaScriptObject {
} }
public final boolean isHttpPasswordSettingsEnabled() { public final boolean isHttpPasswordSettingsEnabled() {
if (isGitBasicAuth() && gitBasicAuthPolicy() == GitBasicAuthPolicy.LDAP) { return gitBasicAuthPolicy() != GitBasicAuthPolicy.LDAP;
return false;
}
return true;
} }
public final GitBasicAuthPolicy gitBasicAuthPolicy() { public final GitBasicAuthPolicy gitBasicAuthPolicy() {
@@ -108,8 +105,6 @@ public class AuthInfo extends JavaScriptObject {
public final native String httpPasswordUrl() /*-{ return this.http_password_url; }-*/; public final native String httpPasswordUrl() /*-{ return this.http_password_url; }-*/;
public final native boolean isGitBasicAuth() /*-{ return this.is_git_basic_auth || false; }-*/;
private native String gitBasicAuthPolicyRaw() /*-{ return this.git_basic_auth_policy; }-*/; private native String gitBasicAuthPolicyRaw() /*-{ return this.git_basic_auth_policy; }-*/;
private native String authTypeRaw() /*-{ return this.auth_type; }-*/; private native String authTypeRaw() /*-{ return this.auth_type; }-*/;

View File

@@ -592,9 +592,7 @@ public class Dispatcher {
return new MyPasswordScreen(); return new MyPasswordScreen();
} }
if (matchExact(SETTINGS_OAUTH_TOKEN, token) if (matchExact(SETTINGS_OAUTH_TOKEN, token) && Gerrit.info().auth().isOAuth()) {
&& Gerrit.info().auth().isOAuth()
&& Gerrit.info().auth().isGitBasicAuth()) {
return new MyOAuthTokenScreen(); return new MyOAuthTokenScreen();
} }

View File

@@ -46,7 +46,7 @@ public abstract class SettingsScreen extends MenuScreen {
if (Gerrit.info().auth().isHttpPasswordSettingsEnabled()) { if (Gerrit.info().auth().isHttpPasswordSettingsEnabled()) {
linkByGerrit(Util.C.tabHttpAccess(), PageLinks.SETTINGS_HTTP_PASSWORD); linkByGerrit(Util.C.tabHttpAccess(), PageLinks.SETTINGS_HTTP_PASSWORD);
} }
if (Gerrit.info().auth().isOAuth() && Gerrit.info().auth().isGitBasicAuth()) { if (Gerrit.info().auth().isOAuth()) {
linkByGerrit(Util.C.tabOAuthToken(), PageLinks.SETTINGS_OAUTH_TOKEN); linkByGerrit(Util.C.tabOAuthToken(), PageLinks.SETTINGS_OAUTH_TOKEN);
} }
if (Gerrit.info().gerrit().editGpgKeys()) { if (Gerrit.info().gerrit().editGpgKeys()) {