From 1b7a43e82b1bedd33ee07f8f9d8551be9a4608ad Mon Sep 17 00:00:00 2001 From: Jay Lee Date: Wed, 3 Feb 2021 13:32:44 -0500 Subject: [PATCH] avoid building cd for user commands --- src/gam/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gam/__init__.py b/src/gam/__init__.py index 138ead66..3b720b3e 100755 --- a/src/gam/__init__.py +++ b/src/gam/__init__.py @@ -9757,7 +9757,10 @@ def getUsersToModify(entity_type=None, entity_type = sys.argv[1].lower() if entity is None: entity = sys.argv[2] - cd = buildGAPIObject('directory') + # avoid building cd for user/users since it + # unnnecesarily pushes user through admin auth + if entity_type not in ['user', 'users']: + cd = buildGAPIObject('directory') if entity_type == 'user': users = [ entity,