Updated gam <UserTypeEntity> update serviceaccount
Some checks are pending
Build and test GAM / build (Win64, build, 9, VC-WIN64A, windows-2022) (push) Waiting to run
Build and test GAM / build (aarch64, build, 3, linux-aarch64, [self-hosted linux arm64]) (push) Waiting to run
Build and test GAM / build (aarch64, build, 5, linux-aarch64, [self-hosted linux arm64], yes) (push) Waiting to run
Build and test GAM / build (aarch64, build, 7, darwin64-arm64, macos-14) (push) Waiting to run
Build and test GAM / build (aarch64, build, 8, darwin64-arm64, macos-15) (push) Waiting to run
Build and test GAM / build (x86_64, build, 1, linux-x86_64, ubuntu-22.04) (push) Waiting to run
Build and test GAM / build (x86_64, build, 2, linux-x86_64, ubuntu-24.04) (push) Waiting to run
Build and test GAM / build (x86_64, build, 4, linux-x86_64, ubuntu-22.04, yes) (push) Waiting to run
Build and test GAM / build (x86_64, build, 6, darwin64-x86_64, macos-13) (push) Waiting to run
Build and test GAM / build (x86_64, test, 10, ubuntu-24.04, 3.9) (push) Waiting to run
Build and test GAM / build (x86_64, test, 11, ubuntu-24.04, 3.10) (push) Waiting to run
Build and test GAM / build (x86_64, test, 12, ubuntu-24.04, 3.11) (push) Waiting to run
Build and test GAM / build (x86_64, test, 13, ubuntu-24.04, 3.12) (push) Waiting to run
Build and test GAM / merge (push) Blocked by required conditions
Build and test GAM / publish (push) Blocked by required conditions
CodeQL / Analyze (python) (push) Waiting to run
Check for Google Root CA Updates / check-apis (push) Waiting to run

to properly set the readonly scope
for `[R] 35)  Meet API (supports readonly)` as it is a special case.
This commit is contained in:
Ross Scroggs
2024-11-20 14:10:41 -08:00
parent 8f7eeae4a7
commit 1870b25b0b
4 changed files with 17 additions and 7 deletions

View File

@@ -1,3 +1,8 @@
7.00.40
Updated `gam <UserTypeEntity> 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.

View File

@@ -25,7 +25,7 @@ https://github.com/GAM-team/GAM/wiki
"""
__author__ = 'GAM Team <google-apps-manager@googlegroups.com>'
__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)

View File

@@ -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'

View File

@@ -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': [],