Merge branch 'stable-2.13'

* stable-2.13:
  OAuthRealm: Add user name field to editableAccountFields
  Update git submodules
  OAuth scheme: Allow to edit user name

Change-Id: I43296198b73c6b34b0aee29c28922c6e75a6c0eb
This commit is contained in:
David Pursehouse
2016-10-19 17:41:25 +09:00

View File

@@ -44,6 +44,9 @@ public class OAuthRealm extends AbstractRealm {
@GerritServerConfig Config config) {
this.loginProviders = loginProviders;
this.editableAccountFields = new HashSet<>();
// User name should be always editable, because not all OAuth providers
// expose them
editableAccountFields.add(AccountFieldName.USER_NAME);
if (config.getBoolean("oauth", null, "allowEditFullName", false)) {
editableAccountFields.add(AccountFieldName.FULL_NAME);
}