OAuth scheme: Allow to edit user name
Not all OAuth providers expose user name. Most notably Google OAuth provider does not. Iinitially user name field was made editable for OAuth scheme in Idc15271b6 but was undone in I0f00599dc. Bug: Issue 4784 Change-Id: Ia37b8849b4a2eef48bf37d8517cd2fbe14d25923
This commit is contained in:
@@ -14,6 +14,8 @@
|
||||
|
||||
package com.google.gerrit.server.auth.oauth;
|
||||
|
||||
import static com.google.gerrit.reviewdb.client.Account.FieldName.USER_NAME;
|
||||
|
||||
import com.google.common.base.Strings;
|
||||
import com.google.gerrit.extensions.auth.oauth.OAuthLoginProvider;
|
||||
import com.google.gerrit.extensions.auth.oauth.OAuthUserInfo;
|
||||
@@ -54,7 +56,7 @@ public class OAuthRealm extends AbstractRealm {
|
||||
|
||||
@Override
|
||||
public boolean allowsEdit(FieldName field) {
|
||||
return editableAccountFields.contains(field);
|
||||
return field == USER_NAME || editableAccountFields.contains(field);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user