Updated emailaddressList <EmailAddressList> and domainlist|notdomainlist <DomainNameList> in <PermissionMatch> to perform case-insensitive matches

This commit is contained in:
Ross Scroggs
2024-04-18 15:03:14 -07:00
parent da1ef497a1
commit 5607d659fb
7 changed files with 33 additions and 17 deletions

View File

@@ -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 See [Downloads](https://github.com/taers232c/GAMADV-XTD3/wiki/Downloads) for Windows or other options, including manual installation
### 6.72.16
Updated `emailaddressList <EmailAddressList>` and `domainlist|notdomainlist <DomainNameList>`
in `<PermissionMatch>` to perform case-insensitive matches as the API is returning mixed case
ACL email addresses in some cases.
### 6.75.15 ### 6.75.15
Updated all commands that display tasks to display the due date in GMT as the time portion 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. 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 ### 6.72.14
Upgraded to Python 3.12.3 where possible. Upgraded to Python 3.12.3 where possible.

View File

@@ -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$ rm -f /Users/admin/GAMConfig/oauth2.txt
admin@server:/Users/admin/bin/gamadv-xtd3$ ./gam version 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 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 <ross.scroggs@gmail.com> Ross Scroggs <ross.scroggs@gmail.com>
Python 3.12.3 64-bit final Python 3.12.3 64-bit final
MacOS Sonoma 14.4.1 x86_64 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>del C:\GAMConfig\oauth2.txt
C:\GAMADV-XTD3>gam version C:\GAMADV-XTD3>gam version
WARNING: Config File: C:\GAMConfig\gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: C:\GAMConfig\oauth2.txt, Not Found 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 <ross.scroggs@gmail.com> Ross Scroggs <ross.scroggs@gmail.com>
Python 3.12.3 64-bit final Python 3.12.3 64-bit final
Windows-10-10.0.17134 AMD64 Windows-10-10.0.17134 AMD64

View File

@@ -20,7 +20,7 @@
|--------------|------------| |--------------|------------|
| AppSheet | 101038 | | AppSheet | 101038 |
| Assured Controls | 101039 | | Assured Controls | 101039 |
| Beyond Corp Enterprise | 101040 | | Chrome Enterprise | 101040 |
| Cloud Identity Free | 101001 | | Cloud Identity Free | 101001 |
| Cloud Identity Premium | 101005 | | Cloud Identity Premium | 101005 |
| Cloud Search | 101035 | | Cloud Search | 101035 |
@@ -43,7 +43,7 @@
| AppSheet Enterprise Standard | 1010380002 | appsheetstandard | | AppSheet Enterprise Standard | 1010380002 | appsheetstandard |
| AppSheet Enterprise Plus | 1010380003 | appsheetplus | | AppSheet Enterprise Plus | 1010380003 | appsheetplus |
| Assured Controls | 1010390001 | assuredcontrols | | Assured Controls | 1010390001 | assuredcontrols |
| Beyond Corp Enterprise | 1010400001 | bce | | Chrome Enterprise Premium | 1010400001 | cep | chromeenterprisepremium |
| Cloud Identity Free | 1010010001 | cloudidentity | | Cloud Identity Free | 1010010001 | cloudidentity |
| Cloud Identity Premium | 1010050001 | cloudidentitypremium | | Cloud Identity Premium | 1010050001 | cloudidentitypremium |
| Cloud Search | 1010350001 | cloudsearch | | Cloud Search | 1010350001 | cloudsearch |
@@ -140,7 +140,7 @@
appsheetstandard | appsheetenterprisestandard | 1010380002 | AppSheet Enterprise Standard | appsheetstandard | appsheetenterprisestandard | 1010380002 | AppSheet Enterprise Standard |
appsheetplus | appsheetenterpriseplus | 1010380003 | AppSheet Enterprise Plus | appsheetplus | appsheetenterpriseplus | 1010380003 | AppSheet Enterprise Plus |
assuredcontrols | 1010390001 | Assured Controls | 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 | cdm | chrome | googlechromedevicemanagement | Google-Chrome-Device-Management |
cloudidentity | identity | 1010010001 | Cloud Identity | cloudidentity | identity | 1010010001 | Cloud Identity |
cloudidentitypremium | identitypremium | 1010050001 | Cloud Identity Premium | cloudidentitypremium | identitypremium | 1010050001 | Cloud Identity Premium |

View File

@@ -3,7 +3,7 @@
Print the current version of Gam with details Print the current version of Gam with details
``` ```
gam version 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 <ross.scroggs@gmail.com> Ross Scroggs <ross.scroggs@gmail.com>
Python 3.12.3 64-bit final Python 3.12.3 64-bit final
MacOS Sonoma 14.4.1 x86_64 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 Print the current version of Gam with details and time offset information
``` ```
gam version timeoffset 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 <ross.scroggs@gmail.com> Ross Scroggs <ross.scroggs@gmail.com>
Python 3.12.3 64-bit final Python 3.12.3 64-bit final
MacOS Sonoma 14.4.1 x86_64 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 Print the current version of Gam with extended details and SSL information
``` ```
gam version extended 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 <ross.scroggs@gmail.com> Ross Scroggs <ross.scroggs@gmail.com>
Python 3.12.3 64-bit final Python 3.12.3 64-bit final
MacOS Sonoma 14.4.1 x86_64 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 Path: /Users/Admin/bin/gamadv-xtd3
Version Check: Version Check:
Current: 5.35.08 Current: 5.35.08
Latest: 6.72.15 Latest: 6.72.16
echo $? echo $?
1 1
``` ```
@@ -72,7 +72,7 @@ echo $?
Print the current version number without details Print the current version number without details
``` ```
gam version simple gam version simple
6.72.15 6.72.16
``` ```
In Linux/MacOS you can do: In Linux/MacOS you can do:
``` ```
@@ -82,7 +82,7 @@ echo $VER
Print the current version of Gam and address of this Wiki Print the current version of Gam and address of this Wiki
``` ```
gam help gam help
GAM 6.72.15 - https://github.com/taers232c/GAMADV-XTD3 GAM 6.72.16 - https://github.com/taers232c/GAMADV-XTD3
Ross Scroggs <ross.scroggs@gmail.com> Ross Scroggs <ross.scroggs@gmail.com>
Python 3.12.3 64-bit final Python 3.12.3 64-bit final
MacOS Sonoma 14.4.1 x86_64 MacOS Sonoma 14.4.1 x86_64

View File

@@ -263,7 +263,7 @@ If an item contains spaces, it should be surrounded by ".
appsheetstandard | appsheetenterprisestandard | 1010380002 | AppSheet Enterprise Standard | appsheetstandard | appsheetenterprisestandard | 1010380002 | AppSheet Enterprise Standard |
appsheetplus | appsheetenterpriseplus | 1010380003 | AppSheet Enterprise Plus | appsheetplus | appsheetenterpriseplus | 1010380003 | AppSheet Enterprise Plus |
assuredcontrols | 1010390001 | Assured Controls | 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 | cdm | chrome | googlechromedevicemanagement | Google-Chrome-Device-Management |
cloudidentity | identity | 1010010001 | Cloud Identity | cloudidentity | identity | 1010010001 | Cloud Identity |
cloudidentitypremium | identitypremium | 1010050001 | Cloud Identity Premium | cloudidentitypremium | identitypremium | 1010050001 | Cloud Identity Premium |

View File

@@ -2,11 +2,19 @@
Merged GAM-Team version Merged GAM-Team version
6.72.16
Updated `emailaddressList <EmailAddressList>` and `domainlist|notdomainlist <DomainNameList>`
in `<PermissionMatch>` to perform case-insensitive matches as the API is returning mixed case
ACL email addresses in some cases.
6.72.15 6.72.15
Updated all commands that display tasks to display the due date in GMT as the time portion 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. 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 6.72.14
Upgraded to Python 3.12.3 where possible. Upgraded to Python 3.12.3 where possible.

View File

@@ -52958,7 +52958,7 @@ class PermissionMatch():
body['emailAddress'] = getREPattern(re.IGNORECASE) body['emailAddress'] = getREPattern(re.IGNORECASE)
self.permissionFields.add('emailAddress') self.permissionFields.add('emailAddress')
elif myarg == 'emailaddresslist': 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') self.permissionFields.add('emailAddress')
elif myarg == 'permissionidlist': elif myarg == 'permissionidlist':
body[myarg] = set(getString(Cmd.OB_PERMISSION_ID_LIST).replace(',', ' ').split()) body[myarg] = set(getString(Cmd.OB_PERMISSION_ID_LIST).replace(',', ' ').split())
@@ -52968,7 +52968,7 @@ class PermissionMatch():
self.permissionFields.add('domain') self.permissionFields.add('domain')
self.permissionFields.add('emailAddress') self.permissionFields.add('emailAddress')
elif myarg in {'domainlist', 'notdomainlist'}: 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('domain')
self.permissionFields.add('emailAddress') self.permissionFields.add('emailAddress')
elif myarg == 'withlink': elif myarg == 'withlink':
@@ -53075,7 +53075,7 @@ class PermissionMatch():
elif field == 'emailaddresslist': elif field == 'emailaddresslist':
emailAddress = permission.get('emailAddress') emailAddress = permission.get('emailAddress')
if emailAddress: if emailAddress:
if emailAddress not in value: if emailAddress.lower() not in value:
break break
else: else:
break break
@@ -53091,9 +53091,9 @@ class PermissionMatch():
break break
else: else:
if 'domain' in permission: if 'domain' in permission:
domain = permission['domain'] domain = permission['domain'].lower()
elif 'emailAddress' in permission and permission['emailAddress']: elif 'emailAddress' in permission and permission['emailAddress']:
_, domain = splitEmailAddress(permission['emailAddress']) _, domain = splitEmailAddress(permission['emailAddress'].lower())
else: else:
break break
if ((field == 'domain' and not value.match(domain)) or if ((field == 'domain' and not value.match(domain)) or