From 84bfeffe467d0e8fdfb3f009b5c4eeeedb118a1e Mon Sep 17 00:00:00 2001 From: Jay Lee Date: Wed, 3 Feb 2021 19:42:26 -0500 Subject: [PATCH] handle usernames only when GC_DOMAIN not set --- src/gam/__init__.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/gam/__init__.py b/src/gam/__init__.py index 3b720b3e..5270f5fd 100755 --- a/src/gam/__init__.py +++ b/src/gam/__init__.py @@ -9759,12 +9759,11 @@ def getUsersToModify(entity_type=None, entity = sys.argv[2] # avoid building cd for user/users since it # unnnecesarily pushes user through admin auth - if entity_type not in ['user', 'users']: + if entity_type not in ['user', 'users'] or \ + ('@' not in entity and not GC_Values[GC_DOMAIN]): cd = buildGAPIObject('directory') if entity_type == 'user': - users = [ - entity, - ] + users = [entity] elif entity_type == 'users': users = entity.replace(',', ' ').split() elif entity_type in ['group', 'group_ns', 'group_susp', 'group_inde']: