Add user objects for local test server (#2744)

Also don't try to do anything related to Google admin directory objects
when running the local test server, for obvious reasons
This commit is contained in:
gbrodman
2025-04-18 15:48:06 +00:00
committed by GitHub
parent ca240adfb6
commit 0153c6284a
9 changed files with 200 additions and 35 deletions
@@ -144,7 +144,6 @@ public abstract class CredentialModule {
Duration tokenRefreshDelay,
Clock clock) {
GoogleCredentials signer = credentialsBundle.getGoogleCredentials();
checkArgument(
signer instanceof ServiceAccountSigner,
"Expecting a ServiceAccountSigner, found %s.",
@@ -165,7 +165,7 @@ public class ConsoleUsersAction extends ConsoleApiAction {
User updatedUser = updateUserRegistrarRoles(email, registrarId, null);
// User has no registrars assigned
if (updatedUser.getUserRoles().getRegistrarRoles().size() == 0) {
if (updatedUser.getUserRoles().getRegistrarRoles().isEmpty()) {
try {
directory.users().delete(email).execute();
} catch (IOException e) {