Only enable auth.allowGoogleAccountUpgrade when auth.type = OpenID

Any other time this setting should always be false.

Change-Id: Ia590a07c8abf786ca204579409e6912c015dc42b
Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
Shawn O. Pearce
2009-08-31 08:29:10 -07:00
parent f40b661e37
commit 2b644e2efa

View File

@@ -61,8 +61,12 @@ public class AuthConfig {
anonymousGroups = Collections.singleton(s.anonymousGroupId);
administratorGroup = s.adminGroupId;
allowGoogleAccountUpgrade =
cfg.getBoolean("auth", "allowgoogleaccountupgrade", false);
if (loginType == AuthType.OPENID) {
allowGoogleAccountUpgrade =
cfg.getBoolean("auth", "allowgoogleaccountupgrade", false);
} else {
allowGoogleAccountUpgrade = false;
}
}
private String[] toTrusted(final Config cfg) {