diff --git a/docs/GamUpdates.md b/docs/GamUpdates.md index 6028a5d1..25ff5205 100644 --- a/docs/GamUpdates.md +++ b/docs/GamUpdates.md @@ -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 +### 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 Fixed bug in `gam print|show chatmembers` where the `filter ` was not applied. diff --git a/docs/How-to-Upgrade-from-Standard-GAM.md b/docs/How-to-Upgrade-from-Standard-GAM.md index 53de5fe2..f37c3045 100644 --- a/docs/How-to-Upgrade-from-Standard-GAM.md +++ b/docs/How-to-Upgrade-from-Standard-GAM.md @@ -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$ 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.79.11 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource +GAMADV-XTD3 6.79.12 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource Ross Scroggs Python 3.12.4 64-bit final 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:\>gam version 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 Python 3.12.4 64-bit final Windows-10-10.0.17134 AMD64 diff --git a/docs/Version-and-Help.md b/docs/Version-and-Help.md index cce809c0..b3b3384f 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.79.11 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource +GAMADV-XTD3 6.79.12 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource Ross Scroggs Python 3.12.4 64-bit final 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 ``` 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 Python 3.12.4 64-bit final 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 ``` 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 Python 3.12.4 64-bit final MacOS Sonoma 14.5 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.79.11 + Latest: 6.79.12 echo $? 1 ``` @@ -72,7 +72,7 @@ echo $? Print the current version number without details ``` gam version simple -6.79.11 +6.79.12 ``` 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.79.11 - https://github.com/taers232c/GAMADV-XTD3 +GAM 6.79.12 - https://github.com/taers232c/GAMADV-XTD3 Ross Scroggs Python 3.12.4 64-bit final MacOS Sonoma 14.5 x86_64 diff --git a/src/GamUpdate.txt b/src/GamUpdate.txt index 0a276f5e..68a4850d 100644 --- a/src/GamUpdate.txt +++ b/src/GamUpdate.txt @@ -2,6 +2,13 @@ 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 Fixed bug in `gam print|show chatmembers` where the `filter ` was not applied. diff --git a/src/gam/__init__.py b/src/gam/__init__.py index dd92d505..5123a88c 100755 --- a/src/gam/__init__.py +++ b/src/gam/__init__.py @@ -25920,12 +25920,11 @@ def printShowChatSpaces(users): csvPF = CSVPrintFile(['User', 'name'] if not isinstance(users, list) else ['name']) if Act.csvFormat() else None FJQC = FormatJSONQuoteChar(csvPF) 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 = [] queries = [] queryTimes = {} pfilter = '' - kwargs = {} if useAdminAccess: function = 'search' queries = ['customer = "customers/my_customer" AND spaceType = "SPACE"'] @@ -25937,7 +25936,7 @@ def printShowChatSpaces(users): csvPF.GetTodriveParameters() elif getFieldsList(myarg, CHAT_SPACES_FIELDS_CHOICE_MAP, fieldsList, initialField='name', onlyFieldsArg=True): pass - elif not useAdminAccess and _getChatSpaceListParms(myarg, kwargs): + elif not useAdminAccess and _getChatSpaceListParms(myarg, kwargsCS): pass elif useAdminAccess and _getChatSpaceSearchParms(myarg, queries, queryTimes, OBY): pass @@ -25947,9 +25946,10 @@ def printShowChatSpaces(users): i, count, users = getEntityArgument(users) if useAdminAccess: _chkChatAdminAccess(count) - kwargs['orderBy'] = OBY.orderBy + kwargsCS['orderBy'] = OBY.orderBy substituteQueryTimes(queries, queryTimes) - pfilter = kwargs['query'] = queries[0] + pfilter = kwargsCS['query'] = queries[0] + kwargsCS['useAdminAccess'] = True for user in users: i += 1 user, chat, kvList = buildChatServiceObject(api, user, i, count, None, useAdminAccess) @@ -25961,7 +25961,7 @@ def printShowChatSpaces(users): bailOnInternalError=True, throwReasons=[GAPI.NOT_FOUND, GAPI.INVALID_ARGUMENT, GAPI.INTERNAL_ERROR, 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, GAPI.permissionDenied, GAPI.failedPrecondition) as e: exitIfChatNotConfigured(chat, kvList, str(e), i, count) @@ -26600,6 +26600,7 @@ def printShowChatMembers(users): members = callGAPIpages(chat.spaces().members(), 'list', 'memberships', pageMessage=_getChatPageMessage(Ent.CHAT_MEMBER, user, j, jcount, qfilter), 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) for member in members: _getChatMemberEmail(cd, member) diff --git a/src/gam/gamlib/glapi.py b/src/gam/gamlib/glapi.py index 63debb11..cb30b30f 100644 --- a/src/gam/gamlib/glapi.py +++ b/src/gam/gamlib/glapi.py @@ -259,7 +259,7 @@ _INFO = { PUBSUB: {'name': 'Pub / Sub API', 'version': 'v1', 'v2discovery': True}, REPORTS: {'name': 'Reports API', 'version': 'reports_v1', 'v2discovery': True, 'mappedAPI': 'admin'}, 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}, SERVICEUSAGE: {'name': 'Service Usage API', 'version': 'v1', 'v2discovery': True}, SHEETS: {'name': 'Sheets API', 'version': 'v4', 'v2discovery': True}, @@ -475,7 +475,7 @@ _CLIENT_SCOPES = [ 'subscopes': [], 'offByDefault': True, 'scope': 'https://www.googleapis.com/auth/apps.order'}, - {'name': 'Service Account Lookup psuedo-API', + {'name': 'Service Account Lookup pseudo-API', 'api': SERVICEACCOUNTLOOKUP, 'subscopes': [], 'scope': ''}, diff --git a/src/gam/serviceaccountlookup-v1.json b/src/gam/serviceaccountlookup-v1.json index ef480ee3..64f5efa4 100644 --- a/src/gam/serviceaccountlookup-v1.json +++ b/src/gam/serviceaccountlookup-v1.json @@ -2,7 +2,7 @@ "basePath": "", "baseUrl": "https://www.googleapis.com/service_accounts/v1", "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", "documentationLink": "https://example.com/", "fullyEncodeReservedExpansion": true, @@ -135,7 +135,7 @@ } }, "servicePath": "", - "title": "Service Account Lookup Psuedo-API", + "title": "Service Account Lookup Pseudo-API", "version": "v1", "version_module": true } diff --git a/src/serviceaccountlookup-v1.json b/src/serviceaccountlookup-v1.json index ef480ee3..64f5efa4 100644 --- a/src/serviceaccountlookup-v1.json +++ b/src/serviceaccountlookup-v1.json @@ -2,7 +2,7 @@ "basePath": "", "baseUrl": "https://www.googleapis.com/service_accounts/v1", "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", "documentationLink": "https://example.com/", "fullyEncodeReservedExpansion": true, @@ -135,7 +135,7 @@ } }, "servicePath": "", - "title": "Service Account Lookup Psuedo-API", + "title": "Service Account Lookup Pseudo-API", "version": "v1", "version_module": true }