Update bazlets to latest stable-2.15 and adjust to 2.15.4 API Change-Id: I8d3551eb982907e1fbad0ffaf65061d2677275ea
diff --git a/WORKSPACE b/WORKSPACE index 1cba3d1..3517e8b 100644 --- a/WORKSPACE +++ b/WORKSPACE
@@ -3,7 +3,7 @@ load("//:bazlets.bzl", "load_bazlets") load_bazlets( - commit = "7ce9a3f58f030635b3a1229b7fb4c62ee7979bc8", + commit = "88570121c377a8a94c76915566114bf02113a7d9", # local_path = "/home/<user>/projects/bazlets", )
diff --git a/src/main/java/com/googlesource/gerrit/plugins/importer/AccountUtil.java b/src/main/java/com/googlesource/gerrit/plugins/importer/AccountUtil.java index b3f62de..feb5da6 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/importer/AccountUtil.java +++ b/src/main/java/com/googlesource/gerrit/plugins/importer/AccountUtil.java
@@ -33,6 +33,7 @@ import com.google.gerrit.server.account.AuthRequest; import com.google.gerrit.server.account.CreateAccount; import com.google.gerrit.server.account.VersionedAuthorizedKeys; +import com.google.gerrit.server.account.externalids.ExternalId; import com.google.gerrit.server.config.AuthConfig; import com.google.gwtorm.server.OrmException; import com.google.inject.Inject; @@ -113,7 +114,7 @@ private Account.Id createAccountByLdapAndAddSshKeys(GerritApi api, AccountInfo acc) throws NoSuchAccountException, IOException, OrmException, RestApiException, ConfigInvalidException { - if (!acc.username.matches(Account.USER_NAME_PATTERN)) { + if (!ExternalId.isValidUsername(acc.username)) { throw new NoSuchAccountException(String.format("User %s not found", acc.username)); }