From 39db76f189038f82da4195c93c3a846f68a5a1ad Mon Sep 17 00:00:00 2001 From: Ross Scroggs Date: Sat, 15 Jan 2022 01:01:09 -0800 Subject: [PATCH] Four changes (#1471) * Three changes Document: gam show vaultholds|holds hidden for update teamsrive Fix showHoldsForUsers * Standardize update teamdrive input of orgUnitId * One too many = --- src/GamCommands.txt | 2 ++ src/gam/__init__.py | 4 ++-- src/gam/gapi/vault.py | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/GamCommands.txt b/src/GamCommands.txt index f1795144..028cf6b4 100644 --- a/src/GamCommands.txt +++ b/src/GamCommands.txt @@ -1572,6 +1572,7 @@ gam update vaulthold|hold matter [query matter gam info vaulthold|hold matter gam print vaultholds|holds [todrive] [matters ] +gam show vaultholds|holds gam create vaultmatter|matter [name ] [description ] [collaborator|collaborators ] @@ -1762,6 +1763,7 @@ gam create|add teamdrive gam update teamdrive [asadmin] [name ] [(theme|themeid ) | ([customtheme ] [color ])] ( )* + [hidden ] gam delete teamdrive gam show teamdriveinfo [asadmin] gam show teamdrives [query ] [asadmin] diff --git a/src/gam/__init__.py b/src/gam/__init__.py index 6cd78c0e..0bf25cde 100755 --- a/src/gam/__init__.py +++ b/src/gam/__init__.py @@ -8220,8 +8220,8 @@ def doUpdateTeamDrive(users): elif myarg == 'asadmin': useDomainAdminAccess = True i += 1 - elif myarg in ['ou', 'orgunit']: - body['orgUnitId'] = sys.argv[i+1] + elif myarg in ['ou', 'org', 'orgunit']: + body['orgUnitId'] = gapi_directory_orgunits.getOrgUnitId(sys.argv[i + 1]) i += 2 elif myarg in ['hidden']: if getBoolean(sys.argv[i+1], myarg): diff --git a/src/gam/gapi/vault.py b/src/gam/gapi/vault.py index 7c1dce26..686ecaeb 100644 --- a/src/gam/gapi/vault.py +++ b/src/gam/gapi/vault.py @@ -685,8 +685,9 @@ def showHoldsForUsers(users): print(f'FOUND: User\'s OrgUnit is on hold in matterId {matterId} and holdId {hold["holdId"]} named "{hold["name"]}"') else: for account in hold.get('accounts', []): - if user in account.get('email', '').lower(): + if user == account.get('email', '').lower(): print(f'FOUND: User account is on hold in matterId {matterId} and holdId {hold["holdId"]} named "{hold["name"]}"') + break def updateMatter(action=None):