Fixed bug in gam user admin@domain.com print chatspaces asadmin
Some checks failed
Build and test GAM / build (Win64, build, 8, VC-WIN64A, windows-2022) (push) Has been cancelled
Build and test GAM / build (aarch64, build, 2, linux-aarch64, [self-hosted linux arm64]) (push) Has been cancelled
Build and test GAM / build (aarch64, build, 4, linux-aarch64, [self-hosted linux arm64], yes) (push) Has been cancelled
Build and test GAM / build (aarch64, build, 6, darwin64-arm64, macos-14) (push) Has been cancelled
Build and test GAM / build (universal2, build, 7, darwin64-arm64 darwin64-x86_64, macos-14) (push) Has been cancelled
Build and test GAM / build (x86_64, build, 1, linux-x86_64, ubuntu-20.04) (push) Has been cancelled
Build and test GAM / build (x86_64, build, 3, linux-x86_64, ubuntu-20.04, yes) (push) Has been cancelled
Build and test GAM / build (x86_64, build, 5, darwin64-x86_64, macos-12) (push) Has been cancelled
Build and test GAM / build (x86_64, test, 10, ubuntu-22.04, 3.9) (push) Has been cancelled
Build and test GAM / build (x86_64, test, 11, ubuntu-22.04, 3.10) (push) Has been cancelled
Build and test GAM / build (x86_64, test, 12, ubuntu-22.04, 3.11) (push) Has been cancelled
Build and test GAM / build (x86_64, test, 9, ubuntu-22.04, 3.8) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Check for Google Root CA Updates / check-apis (push) Has been cancelled
Build and test GAM / merge (push) Has been cancelled
Build and test GAM / publish (push) Has been cancelled

This commit is contained in:
Ross Scroggs
2024-08-09 08:17:08 -07:00
parent d3a108ae9c
commit 9dab94bd7b
8 changed files with 35 additions and 20 deletions

View File

@@ -10,6 +10,13 @@ Add the `-s` option to the end of the above commands to suppress creating the `g
See [Downloads-Installs](https://github.com/taers232c/GAMADV-XTD3/wiki/Downloads-Installs) for Windows or other options, including manual installation See [Downloads-Installs](https://github.com/taers232c/GAMADV-XTD3/wiki/Downloads-Installs) for Windows or other options, including manual installation
### 6.79.12
Fixed bug in `gam user admin@domain.com print chatspaces asadmin` that caused the following error:
```
Chat Admin: admin@domain.com(asadmin), Print Failed: This method doesn't support non-admin user authentication. Authenticate with an admin account.
```
### 6.79.11 ### 6.79.11
Fixed bug in `gam <UserItem> print|show chatmembers` where the `filter <String>` was not applied. Fixed bug in `gam <UserItem> print|show chatmembers` where the `filter <String>` was not applied.

View File

@@ -251,7 +251,7 @@ writes the credentials into the file oauth2.txt.
admin@server:/Users/admin$ rm -f /Users/admin/GAMConfig/oauth2.txt admin@server:/Users/admin$ rm -f /Users/admin/GAMConfig/oauth2.txt
admin@server:/Users/admin$ gam version admin@server:/Users/admin$ 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.79.11 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource GAMADV-XTD3 6.79.12 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
Ross Scroggs <ross.scroggs@gmail.com> Ross Scroggs <ross.scroggs@gmail.com>
Python 3.12.4 64-bit final Python 3.12.4 64-bit final
MacOS Sonoma 14.5 x86_64 MacOS Sonoma 14.5 x86_64
@@ -923,7 +923,7 @@ writes the credentials into the file oauth2.txt.
C:\>del C:\GAMConfig\oauth2.txt C:\>del C:\GAMConfig\oauth2.txt
C:\>gam version C:\>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.79.11 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource GAMADV-XTD3 6.79.12 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
Ross Scroggs <ross.scroggs@gmail.com> Ross Scroggs <ross.scroggs@gmail.com>
Python 3.12.4 64-bit final Python 3.12.4 64-bit final
Windows-10-10.0.17134 AMD64 Windows-10-10.0.17134 AMD64

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.79.11 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource GAMADV-XTD3 6.79.12 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
Ross Scroggs <ross.scroggs@gmail.com> Ross Scroggs <ross.scroggs@gmail.com>
Python 3.12.4 64-bit final Python 3.12.4 64-bit final
MacOS Sonoma 14.5 x86_64 MacOS Sonoma 14.5 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.79.11 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource GAMADV-XTD3 6.79.12 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
Ross Scroggs <ross.scroggs@gmail.com> Ross Scroggs <ross.scroggs@gmail.com>
Python 3.12.4 64-bit final Python 3.12.4 64-bit final
MacOS Sonoma 14.5 x86_64 MacOS Sonoma 14.5 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.79.11 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource GAMADV-XTD3 6.79.12 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
Ross Scroggs <ross.scroggs@gmail.com> Ross Scroggs <ross.scroggs@gmail.com>
Python 3.12.4 64-bit final Python 3.12.4 64-bit final
MacOS Sonoma 14.5 x86_64 MacOS Sonoma 14.5 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.79.11 Latest: 6.79.12
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.79.11 6.79.12
``` ```
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.79.11 - https://github.com/taers232c/GAMADV-XTD3 GAM 6.79.12 - https://github.com/taers232c/GAMADV-XTD3
Ross Scroggs <ross.scroggs@gmail.com> Ross Scroggs <ross.scroggs@gmail.com>
Python 3.12.4 64-bit final Python 3.12.4 64-bit final
MacOS Sonoma 14.5 x86_64 MacOS Sonoma 14.5 x86_64

View File

@@ -2,6 +2,13 @@
Merged GAM-Team version Merged GAM-Team version
6.79.12
Fixed bug in `gam user admin@domain.com print chatspaces asadmin` that caused the following error:
```
Chat Admin: admin@domain.com(asadmin), Print Failed: This method doesn't support non-admin user authentication. Authenticate with an admin account.
```
6.79.11 6.79.11
Fixed bug in `gam <UserItem> print|show chatmembers` where the `filter <String>` was not applied. Fixed bug in `gam <UserItem> print|show chatmembers` where the `filter <String>` was not applied.

View File

@@ -25920,12 +25920,11 @@ def printShowChatSpaces(users):
csvPF = CSVPrintFile(['User', 'name'] if not isinstance(users, list) else ['name']) if Act.csvFormat() else None csvPF = CSVPrintFile(['User', 'name'] if not isinstance(users, list) else ['name']) if Act.csvFormat() else None
FJQC = FormatJSONQuoteChar(csvPF) FJQC = FormatJSONQuoteChar(csvPF)
OBY = OrderBy(CHAT_SPACES_ADMIN_ORDERBY_CHOICE_MAP) OBY = OrderBy(CHAT_SPACES_ADMIN_ORDERBY_CHOICE_MAP)
useAdminAccess, api, kwargs = _getChatAdminAccess(API.CHAT_SPACES_ADMIN, API.CHAT_SPACES) useAdminAccess, api, kwargsCS = _getChatAdminAccess(API.CHAT_SPACES_ADMIN, API.CHAT_SPACES)
fieldsList = [] fieldsList = []
queries = [] queries = []
queryTimes = {} queryTimes = {}
pfilter = '' pfilter = ''
kwargs = {}
if useAdminAccess: if useAdminAccess:
function = 'search' function = 'search'
queries = ['customer = "customers/my_customer" AND spaceType = "SPACE"'] queries = ['customer = "customers/my_customer" AND spaceType = "SPACE"']
@@ -25937,7 +25936,7 @@ def printShowChatSpaces(users):
csvPF.GetTodriveParameters() csvPF.GetTodriveParameters()
elif getFieldsList(myarg, CHAT_SPACES_FIELDS_CHOICE_MAP, fieldsList, initialField='name', onlyFieldsArg=True): elif getFieldsList(myarg, CHAT_SPACES_FIELDS_CHOICE_MAP, fieldsList, initialField='name', onlyFieldsArg=True):
pass pass
elif not useAdminAccess and _getChatSpaceListParms(myarg, kwargs): elif not useAdminAccess and _getChatSpaceListParms(myarg, kwargsCS):
pass pass
elif useAdminAccess and _getChatSpaceSearchParms(myarg, queries, queryTimes, OBY): elif useAdminAccess and _getChatSpaceSearchParms(myarg, queries, queryTimes, OBY):
pass pass
@@ -25947,9 +25946,10 @@ def printShowChatSpaces(users):
i, count, users = getEntityArgument(users) i, count, users = getEntityArgument(users)
if useAdminAccess: if useAdminAccess:
_chkChatAdminAccess(count) _chkChatAdminAccess(count)
kwargs['orderBy'] = OBY.orderBy kwargsCS['orderBy'] = OBY.orderBy
substituteQueryTimes(queries, queryTimes) substituteQueryTimes(queries, queryTimes)
pfilter = kwargs['query'] = queries[0] pfilter = kwargsCS['query'] = queries[0]
kwargsCS['useAdminAccess'] = True
for user in users: for user in users:
i += 1 i += 1
user, chat, kvList = buildChatServiceObject(api, user, i, count, None, useAdminAccess) user, chat, kvList = buildChatServiceObject(api, user, i, count, None, useAdminAccess)
@@ -25961,7 +25961,7 @@ def printShowChatSpaces(users):
bailOnInternalError=True, bailOnInternalError=True,
throwReasons=[GAPI.NOT_FOUND, GAPI.INVALID_ARGUMENT, GAPI.INTERNAL_ERROR, throwReasons=[GAPI.NOT_FOUND, GAPI.INVALID_ARGUMENT, GAPI.INTERNAL_ERROR,
GAPI.PERMISSION_DENIED, GAPI.FAILED_PRECONDITION], GAPI.PERMISSION_DENIED, GAPI.FAILED_PRECONDITION],
fields=fields, pageSize=CHAT_PAGE_SIZE, **kwargs) fields=fields, pageSize=CHAT_PAGE_SIZE, **kwargsCS)
except (GAPI.notFound, GAPI.invalidArgument, GAPI.internalError, except (GAPI.notFound, GAPI.invalidArgument, GAPI.internalError,
GAPI.permissionDenied, GAPI.failedPrecondition) as e: GAPI.permissionDenied, GAPI.failedPrecondition) as e:
exitIfChatNotConfigured(chat, kvList, str(e), i, count) exitIfChatNotConfigured(chat, kvList, str(e), i, count)
@@ -26600,6 +26600,7 @@ def printShowChatMembers(users):
members = callGAPIpages(chat.spaces().members(), 'list', 'memberships', members = callGAPIpages(chat.spaces().members(), 'list', 'memberships',
pageMessage=_getChatPageMessage(Ent.CHAT_MEMBER, user, j, jcount, qfilter), pageMessage=_getChatPageMessage(Ent.CHAT_MEMBER, user, j, jcount, qfilter),
throwReasons=[GAPI.NOT_FOUND, GAPI.INVALID_ARGUMENT, GAPI.PERMISSION_DENIED], throwReasons=[GAPI.NOT_FOUND, GAPI.INVALID_ARGUMENT, GAPI.PERMISSION_DENIED],
retryReasons=GAPI.SERVICE_NOT_AVAILABLE_RETRY_REASONS,
parent=parentName, fields=fields, pageSize=CHAT_PAGE_SIZE, **kwargs, **kwargsUAA) parent=parentName, fields=fields, pageSize=CHAT_PAGE_SIZE, **kwargs, **kwargsUAA)
for member in members: for member in members:
_getChatMemberEmail(cd, member) _getChatMemberEmail(cd, member)

View File

@@ -259,7 +259,7 @@ _INFO = {
PUBSUB: {'name': 'Pub / Sub API', 'version': 'v1', 'v2discovery': True}, PUBSUB: {'name': 'Pub / Sub API', 'version': 'v1', 'v2discovery': True},
REPORTS: {'name': 'Reports API', 'version': 'reports_v1', 'v2discovery': True, 'mappedAPI': 'admin'}, REPORTS: {'name': 'Reports API', 'version': 'reports_v1', 'v2discovery': True, 'mappedAPI': 'admin'},
RESELLER: {'name': 'Reseller API', 'version': 'v1', 'v2discovery': True}, RESELLER: {'name': 'Reseller API', 'version': 'v1', 'v2discovery': True},
SERVICEACCOUNTLOOKUP: {'name': 'Service Account Lookup psuedo-API', 'version': 'v1', 'v2discovery': True, 'localjson': True}, SERVICEACCOUNTLOOKUP: {'name': 'Service Account Lookup pseudo-API', 'version': 'v1', 'v2discovery': True, 'localjson': True},
SERVICEMANAGEMENT: {'name': 'Service Management API', 'version': 'v1', 'v2discovery': True}, SERVICEMANAGEMENT: {'name': 'Service Management API', 'version': 'v1', 'v2discovery': True},
SERVICEUSAGE: {'name': 'Service Usage API', 'version': 'v1', 'v2discovery': True}, SERVICEUSAGE: {'name': 'Service Usage API', 'version': 'v1', 'v2discovery': True},
SHEETS: {'name': 'Sheets API', 'version': 'v4', 'v2discovery': True}, SHEETS: {'name': 'Sheets API', 'version': 'v4', 'v2discovery': True},
@@ -475,7 +475,7 @@ _CLIENT_SCOPES = [
'subscopes': [], 'subscopes': [],
'offByDefault': True, 'offByDefault': True,
'scope': 'https://www.googleapis.com/auth/apps.order'}, 'scope': 'https://www.googleapis.com/auth/apps.order'},
{'name': 'Service Account Lookup psuedo-API', {'name': 'Service Account Lookup pseudo-API',
'api': SERVICEACCOUNTLOOKUP, 'api': SERVICEACCOUNTLOOKUP,
'subscopes': [], 'subscopes': [],
'scope': ''}, 'scope': ''},

View File

@@ -2,7 +2,7 @@
"basePath": "", "basePath": "",
"baseUrl": "https://www.googleapis.com/service_accounts/v1", "baseUrl": "https://www.googleapis.com/service_accounts/v1",
"canonicalName": "serviceaccountlookup", "canonicalName": "serviceaccountlookup",
"description": "Psuedo-API to lookup public certificates for a service account anonymously", "description": "Pseudo-API to lookup public certificates for a service account anonymously",
"discoveryVersion": "v1", "discoveryVersion": "v1",
"documentationLink": "https://example.com/", "documentationLink": "https://example.com/",
"fullyEncodeReservedExpansion": true, "fullyEncodeReservedExpansion": true,
@@ -135,7 +135,7 @@
} }
}, },
"servicePath": "", "servicePath": "",
"title": "Service Account Lookup Psuedo-API", "title": "Service Account Lookup Pseudo-API",
"version": "v1", "version": "v1",
"version_module": true "version_module": true
} }

View File

@@ -2,7 +2,7 @@
"basePath": "", "basePath": "",
"baseUrl": "https://www.googleapis.com/service_accounts/v1", "baseUrl": "https://www.googleapis.com/service_accounts/v1",
"canonicalName": "serviceaccountlookup", "canonicalName": "serviceaccountlookup",
"description": "Psuedo-API to lookup public certificates for a service account anonymously", "description": "Pseudo-API to lookup public certificates for a service account anonymously",
"discoveryVersion": "v1", "discoveryVersion": "v1",
"documentationLink": "https://example.com/", "documentationLink": "https://example.com/",
"fullyEncodeReservedExpansion": true, "fullyEncodeReservedExpansion": true,
@@ -135,7 +135,7 @@
} }
}, },
"servicePath": "", "servicePath": "",
"title": "Service Account Lookup Psuedo-API", "title": "Service Account Lookup Pseudo-API",
"version": "v1", "version": "v1",
"version_module": true "version_module": true
} }