From 5607d659fb96e30b508e7e498db085ff16a9ea4f Mon Sep 17 00:00:00 2001 From: Ross Scroggs Date: Thu, 18 Apr 2024 15:03:14 -0700 Subject: [PATCH] Updated `emailaddressList ` and `domainlist|notdomainlist ` in `` to perform case-insensitive matches --- docs/GamUpdates.md | 8 ++++++++ docs/How-to-Upgrade-from-Standard-GAM.md | 4 ++-- docs/Licenses.md | 6 +++--- docs/Version-and-Help.md | 12 ++++++------ src/GamCommands.txt | 2 +- src/GamUpdate.txt | 8 ++++++++ src/gam/__init__.py | 10 +++++----- 7 files changed, 33 insertions(+), 17 deletions(-) diff --git a/docs/GamUpdates.md b/docs/GamUpdates.md index e025b312..63bed7f7 100644 --- a/docs/GamUpdates.md +++ b/docs/GamUpdates.md @@ -10,11 +10,19 @@ Add the `-s` option to the end of the above commands to suppress creating the `g See [Downloads](https://github.com/taers232c/GAMADV-XTD3/wiki/Downloads) for Windows or other options, including manual installation +### 6.72.16 + +Updated `emailaddressList ` and `domainlist|notdomainlist ` +in `` to perform case-insensitive matches as the API is returning mixed case +ACL email addresses in some cases. + ### 6.75.15 Updated all commands that display tasks to display the due date in GMT as the time portion is not supported by the API and converting the due date to local time may display the wrong date. +Renamed license SKU `1010400001` from `Beyond Corp Enterprise` to `Chrome Enterprise Premium`. + ### 6.72.14 Upgraded to Python 3.12.3 where possible. diff --git a/docs/How-to-Upgrade-from-Standard-GAM.md b/docs/How-to-Upgrade-from-Standard-GAM.md index b60aaff8..856ab8d5 100644 --- a/docs/How-to-Upgrade-from-Standard-GAM.md +++ b/docs/How-to-Upgrade-from-Standard-GAM.md @@ -334,7 +334,7 @@ writes the credentials into the file oauth2.txt. admin@server:/Users/admin/bin/gamadv-xtd3$ rm -f /Users/admin/GAMConfig/oauth2.txt admin@server:/Users/admin/bin/gamadv-xtd3$ ./gam version WARNING: Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: /Users/admin/GAMConfig/oauth2.txt, Not Found -GAMADV-XTD3 6.72.15 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource +GAMADV-XTD3 6.72.16 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource Ross Scroggs Python 3.12.3 64-bit final MacOS Sonoma 14.4.1 x86_64 @@ -1006,7 +1006,7 @@ writes the credentials into the file oauth2.txt. C:\GAMADV-XTD3>del C:\GAMConfig\oauth2.txt C:\GAMADV-XTD3>gam version WARNING: Config File: C:\GAMConfig\gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: C:\GAMConfig\oauth2.txt, Not Found -GAMADV-XTD3 6.72.15 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource +GAMADV-XTD3 6.72.16 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource Ross Scroggs Python 3.12.3 64-bit final Windows-10-10.0.17134 AMD64 diff --git a/docs/Licenses.md b/docs/Licenses.md index 3d7147ad..a0cb4ad6 100644 --- a/docs/Licenses.md +++ b/docs/Licenses.md @@ -20,7 +20,7 @@ |--------------|------------| | AppSheet | 101038 | | Assured Controls | 101039 | -| Beyond Corp Enterprise | 101040 | +| Chrome Enterprise | 101040 | | Cloud Identity Free | 101001 | | Cloud Identity Premium | 101005 | | Cloud Search | 101035 | @@ -43,7 +43,7 @@ | AppSheet Enterprise Standard | 1010380002 | appsheetstandard | | AppSheet Enterprise Plus | 1010380003 | appsheetplus | | Assured Controls | 1010390001 | assuredcontrols | -| Beyond Corp Enterprise | 1010400001 | bce | +| Chrome Enterprise Premium | 1010400001 | cep | chromeenterprisepremium | | Cloud Identity Free | 1010010001 | cloudidentity | | Cloud Identity Premium | 1010050001 | cloudidentitypremium | | Cloud Search | 1010350001 | cloudsearch | @@ -140,7 +140,7 @@ appsheetstandard | appsheetenterprisestandard | 1010380002 | AppSheet Enterprise Standard | appsheetplus | appsheetenterpriseplus | 1010380003 | AppSheet Enterprise Plus | assuredcontrols | 1010390001 | Assured Controls | - bce | beyondcorp | beyondcorpenterprise | 1010400001 | Beyond Corp Enterprise | + bce | beyondcorp | beyondcorpenterprise | cep | chromeenterprisepremium | 1010400001 | Chrome Enterprise Premium | cdm | chrome | googlechromedevicemanagement | Google-Chrome-Device-Management | cloudidentity | identity | 1010010001 | Cloud Identity | cloudidentitypremium | identitypremium | 1010050001 | Cloud Identity Premium | diff --git a/docs/Version-and-Help.md b/docs/Version-and-Help.md index b4e46800..032dc84a 100644 --- a/docs/Version-and-Help.md +++ b/docs/Version-and-Help.md @@ -3,7 +3,7 @@ Print the current version of Gam with details ``` gam version -GAMADV-XTD3 6.72.15 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource +GAMADV-XTD3 6.72.16 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource Ross Scroggs Python 3.12.3 64-bit final MacOS Sonoma 14.4.1 x86_64 @@ -15,7 +15,7 @@ Time: 2023-06-02T21:10:00-07:00 Print the current version of Gam with details and time offset information ``` gam version timeoffset -GAMADV-XTD3 6.72.15 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource +GAMADV-XTD3 6.72.16 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource Ross Scroggs Python 3.12.3 64-bit final MacOS Sonoma 14.4.1 x86_64 @@ -27,7 +27,7 @@ Your system time differs from www.googleapis.com by less than 1 second Print the current version of Gam with extended details and SSL information ``` gam version extended -GAMADV-XTD3 6.72.15 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource +GAMADV-XTD3 6.72.16 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource Ross Scroggs Python 3.12.3 64-bit final MacOS Sonoma 14.4.1 x86_64 @@ -64,7 +64,7 @@ MacOS High Sierra 10.13.6 x86_64 Path: /Users/Admin/bin/gamadv-xtd3 Version Check: Current: 5.35.08 - Latest: 6.72.15 + Latest: 6.72.16 echo $? 1 ``` @@ -72,7 +72,7 @@ echo $? Print the current version number without details ``` gam version simple -6.72.15 +6.72.16 ``` In Linux/MacOS you can do: ``` @@ -82,7 +82,7 @@ echo $VER Print the current version of Gam and address of this Wiki ``` gam help -GAM 6.72.15 - https://github.com/taers232c/GAMADV-XTD3 +GAM 6.72.16 - https://github.com/taers232c/GAMADV-XTD3 Ross Scroggs Python 3.12.3 64-bit final MacOS Sonoma 14.4.1 x86_64 diff --git a/src/GamCommands.txt b/src/GamCommands.txt index 1c0964e0..3428f5dc 100644 --- a/src/GamCommands.txt +++ b/src/GamCommands.txt @@ -263,7 +263,7 @@ If an item contains spaces, it should be surrounded by ". appsheetstandard | appsheetenterprisestandard | 1010380002 | AppSheet Enterprise Standard | appsheetplus | appsheetenterpriseplus | 1010380003 | AppSheet Enterprise Plus | assuredcontrols | 1010390001 | Assured Controls | - bce | beyondcorp | beyondcorpenterprise | 1010400001 | Beyond Corp Enterprise | + bce | beyondcorp | beyondcorpenterprise | cep | chromeenterprisepremium | 1010400001 | Chrome Enterprise Premium | cdm | chrome | googlechromedevicemanagement | Google-Chrome-Device-Management | cloudidentity | identity | 1010010001 | Cloud Identity | cloudidentitypremium | identitypremium | 1010050001 | Cloud Identity Premium | diff --git a/src/GamUpdate.txt b/src/GamUpdate.txt index 36f84b1d..aa300fa7 100644 --- a/src/GamUpdate.txt +++ b/src/GamUpdate.txt @@ -2,11 +2,19 @@ Merged GAM-Team version +6.72.16 + +Updated `emailaddressList ` and `domainlist|notdomainlist ` +in `` to perform case-insensitive matches as the API is returning mixed case +ACL email addresses in some cases. + 6.72.15 Updated all commands that display tasks to display the due date in GMT as the time portion is not supported by the API and converting the due date to local time may display the wrong date. +Renamed license SKU `1010400001` from `Beyond Corp Enterprise` to `Chrome Enterprise Premium`. + 6.72.14 Upgraded to Python 3.12.3 where possible. diff --git a/src/gam/__init__.py b/src/gam/__init__.py index 634665e7..a115fc3b 100755 --- a/src/gam/__init__.py +++ b/src/gam/__init__.py @@ -52958,7 +52958,7 @@ class PermissionMatch(): body['emailAddress'] = getREPattern(re.IGNORECASE) self.permissionFields.add('emailAddress') elif myarg == 'emailaddresslist': - body[myarg] = set(getString(Cmd.OB_EMAIL_ADDRESS_LIST).replace(',', ' ').split()) + body[myarg] = set(getString(Cmd.OB_EMAIL_ADDRESS_LIST).replace(',', ' ').lower().split()) self.permissionFields.add('emailAddress') elif myarg == 'permissionidlist': body[myarg] = set(getString(Cmd.OB_PERMISSION_ID_LIST).replace(',', ' ').split()) @@ -52968,7 +52968,7 @@ class PermissionMatch(): self.permissionFields.add('domain') self.permissionFields.add('emailAddress') elif myarg in {'domainlist', 'notdomainlist'}: - body[myarg] = set(getString(Cmd.OB_DOMAIN_NAME_LIST).replace(',', ' ').split()) + body[myarg] = set(getString(Cmd.OB_DOMAIN_NAME_LIST).replace(',', ' ').lower().split()) self.permissionFields.add('domain') self.permissionFields.add('emailAddress') elif myarg == 'withlink': @@ -53075,7 +53075,7 @@ class PermissionMatch(): elif field == 'emailaddresslist': emailAddress = permission.get('emailAddress') if emailAddress: - if emailAddress not in value: + if emailAddress.lower() not in value: break else: break @@ -53091,9 +53091,9 @@ class PermissionMatch(): break else: if 'domain' in permission: - domain = permission['domain'] + domain = permission['domain'].lower() elif 'emailAddress' in permission and permission['emailAddress']: - _, domain = splitEmailAddress(permission['emailAddress']) + _, domain = splitEmailAddress(permission['emailAddress'].lower()) else: break if ((field == 'domain' and not value.match(domain)) or