From 04371eee5358f6af515f3983b242f0f673da4c69 Mon Sep 17 00:00:00 2001 From: Ross Scroggs Date: Thu, 21 Aug 2025 12:40:58 -0700 Subject: [PATCH] Meet API fixes #1822 --- src/GamUpdate.txt | 4 ++-- src/gam/__init__.py | 9 ++++++--- src/gam/gamlib/glapi.py | 16 ++++++++-------- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/src/GamUpdate.txt b/src/GamUpdate.txt index 89c27d70..20d080f2 100644 --- a/src/GamUpdate.txt +++ b/src/GamUpdate.txt @@ -4,8 +4,8 @@ Eliminated `drive_v3_beta` and `meet_v2_beta` from `gam.cfg` as the API betas ar Updated `Meet API` scopes so that GAM can read metadata about additional Meet spaces. ``` -[*] 34) Meet API - Display Meet Conference Records -[*] 35) Meet API - Manage/Display Meet Spaces +[*] 34) Meet API - Manage/Display Meeting Spaces +[*] 35) Meet API - Read Meeting Spaces metadata ``` 7.18.07 diff --git a/src/gam/__init__.py b/src/gam/__init__.py index 4f6e1d1d..3bd16f15 100755 --- a/src/gam/__init__.py +++ b/src/gam/__init__.py @@ -4795,7 +4795,10 @@ def defaultSvcAcctScopes(): for scope in scopesList: if not scope.get('offByDefault'): saScopes.setdefault(scope['api'], []) - saScopes[scope['api']].append(scope['scope']) + if not isinstance(scope['scope'], list): + saScopes[scope['api']].append(scope['scope']) + else: + saScopes[scope['api']].extend(scope['scope']) saScopes[API.DRIVEACTIVITY].append(API.DRIVE_SCOPE) saScopes[API.DRIVE2] = saScopes[API.DRIVE3] saScopes[API.DRIVETD] = saScopes[API.DRIVE3] @@ -28533,7 +28536,7 @@ def printShowMeetConferences(users): i, count, users = getEntityArgument(users) for user in users: i += 1 - user, meet, kvList = buildMeetServiceObject(API.MEET_CONFRECS, user, i, count, [Ent.MEET_CONFERENCE, None]) + user, meet, kvList = buildMeetServiceObject(API.MEET_READONLY, user, i, count, [Ent.MEET_CONFERENCE, None]) if not meet: continue try: @@ -28609,7 +28612,7 @@ def _printShowMeetItems(users, entityType): i, count, users = getEntityArgument(users) for user in users: i += 1 - user, meet, kvList = buildMeetServiceObject(API.MEET_CONFRECS, user, i, count, [Ent.MEET_CONFERENCE, parent]) + user, meet, kvList = buildMeetServiceObject(API.MEET_READONLY, user, i, count, [Ent.MEET_CONFERENCE, parent]) if not meet: continue if entityType == Ent.MEET_PARTICIPANT: diff --git a/src/gam/gamlib/glapi.py b/src/gam/gamlib/glapi.py index a2a9780a..d7ab86ea 100644 --- a/src/gam/gamlib/glapi.py +++ b/src/gam/gamlib/glapi.py @@ -75,8 +75,8 @@ IAM_CREDENTIALS = 'iamcredentials' KEEP = 'keep' LICENSING = 'licensing' LOOKERSTUDIO = 'datastudio' -MEET_CONFRECS = 'meetreadonly' MEET_SPACES = 'meet' +MEET_READONLY = 'meetreadonly' OAUTH2 = 'oauth2' ORGPOLICY = 'orgpolicy' PEOPLE = 'people' @@ -267,8 +267,8 @@ _INFO = { KEEP: {'name': 'Keep API', 'version': 'v1', 'v2discovery': True}, LICENSING: {'name': 'License Manager API', 'version': 'v1', 'v2discovery': True}, LOOKERSTUDIO: {'name': 'Looker Studio API', 'version': 'v1', 'v2discovery': True, 'localjson': True}, - MEET_CONFRECS: {'name': 'Meet API - Display Meet Conference Records', 'version': 'v2', 'v2discovery': True, 'mappedAPI': MEET_SPACES}, - MEET_SPACES: {'name': 'Meet API - Manage/Display Meet Spaces', 'version': 'v2', 'v2discovery': True}, + MEET_SPACES: {'name': 'Meet API - Manage/Display Meeting Spaces', 'version': 'v2', 'v2discovery': True}, + MEET_READONLY: {'name': 'Meet API - Read Meeting Spaces metadata', 'version': 'v2', 'v2discovery': True, 'mappedAPI': MEET_SPACES}, OAUTH2: {'name': 'OAuth2 API', 'version': 'v2', 'v2discovery': False}, ORGPOLICY: {'name': 'Organization Policy API', 'version': 'v2', 'v2discovery': True}, PEOPLE: {'name': 'People API', 'version': 'v1', 'v2discovery': True}, @@ -689,15 +689,15 @@ _SVCACCT_SCOPES = [ 'api': LOOKERSTUDIO, 'subscopes': READONLY, 'scope': 'https://www.googleapis.com/auth/datastudio'}, - {'name': 'Meet API - Display Meet Conference Records', - 'api': MEET_CONFRECS, - 'subscopes': [], - 'scope': 'https://www.googleapis.com/auth/meetings.space.readonly'}, - {'name': 'Meet API - Manage/Display Meet Spaces', + {'name': 'Meet API - Manage/Display Meeting Spaces', 'api': MEET_SPACES, 'subscopes': [], 'scope': ['https://www.googleapis.com/auth/meetings.space.created', 'https://www.googleapis.com/auth/meetings.space.settings']}, + {'name': 'Meet API - Read Meeting Spaces metadata', + 'api': MEET_READONLY, + 'subscopes': [], + 'scope': 'https://www.googleapis.com/auth/meetings.space.readonly'}, {'name': 'OAuth2 API', 'api': OAUTH2, 'subscopes': [],