diff --git a/src/GamUpdate.txt b/src/GamUpdate.txt index 736a4cae..f84ead61 100644 --- a/src/GamUpdate.txt +++ b/src/GamUpdate.txt @@ -1,3 +1,8 @@ +7.00.40 + +Updated `gam update serviceaccount` to properly set the readonly scope +for `[R] 35) Meet API (supports readonly)` as it is a special case. + 7.00.39 Supported MacOS versions are now in the download filename. diff --git a/src/gam/__init__.py b/src/gam/__init__.py index 81d138db..dfaa6084 100755 --- a/src/gam/__init__.py +++ b/src/gam/__init__.py @@ -25,7 +25,7 @@ https://github.com/GAM-team/GAM/wiki """ __author__ = 'GAM Team ' -__version__ = '7.00.39' +__version__ = '7.00.40' __license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)' #pylint: disable=wrong-import-position @@ -10550,7 +10550,7 @@ Continue to authorization by entering a 'c' selectedScopes[i] = '*' break if 'readonly' in a_scope['subscopes']: - if scope == possibleScope+'.readonly': + if (scope == possibleScope+'.readonly') or (scope == a_scope.get('roscope')): selectedScopes[i] = 'R' break i += 1 @@ -12140,8 +12140,12 @@ def checkServiceAccount(users): checkScopesSet.add(scope['scope']) elif selectedScopes[i] == 'R': saScopes.setdefault(scope['api'], []) - saScopes[scope['api']].append(f'{scope["scope"]}.readonly') - checkScopesSet.add(f'{scope["scope"]}.readonly') + if 'roscope' not in scope: + saScopes[scope['api']].append(f'{scope["scope"]}.readonly') + checkScopesSet.add(f'{scope["scope"]}.readonly') + else: + saScopes[scope['api']].append(scope['roscope']) + checkScopesSet.add(scope['roscope']) i += 1 if API.DRIVEACTIVITY in saScopes and API.DRIVE3 in saScopes: saScopes[API.DRIVEACTIVITY].append(API.DRIVE_SCOPE) diff --git a/src/gam/gamlib/glaction.py b/src/gam/gamlib/glaction.py index 095ff1e5..15dbe868 100644 --- a/src/gam/gamlib/glaction.py +++ b/src/gam/gamlib/glaction.py @@ -38,8 +38,8 @@ class GamAction(): CLAIM_OWNERSHIP = 'clow' CLEAR = 'clea' CLOSE = 'clos' - COLLECT = 'collect' - COMMENT = 'comment' + COLLECT = 'coll' + COMMENT = 'comm' COPY = 'copy' COPY_MERGE = 'copm' CREATE = 'crea' diff --git a/src/gam/gamlib/glapi.py b/src/gam/gamlib/glapi.py index b2dbd654..74cabfd8 100644 --- a/src/gam/gamlib/glapi.py +++ b/src/gam/gamlib/glapi.py @@ -666,7 +666,8 @@ _SVCACCT_SCOPES = [ {'name': 'Meet API', 'api': MEET, 'subscopes': READONLY, - 'scope': 'https://www.googleapis.com/auth/meetings.space.created'}, + 'scope': 'https://www.googleapis.com/auth/meetings.space.created', + 'roscope': 'https://www.googleapis.com/auth/meetings.space.readonly'}, {'name': 'OAuth2 API', 'api': OAUTH2, 'subscopes': [],