siteverification off by default, roByDefault for policy

This commit is contained in:
Jay Lee
2024-10-24 16:21:30 -04:00
parent 04156061c4
commit 8e5f5c9a6b
2 changed files with 10 additions and 3 deletions

View File

@@ -10556,7 +10556,12 @@ Continue to authorization by entering a 'c'
else:
i = 0
for a_scope in scopesList:
selectedScopes[i] = ' ' if a_scope.get('offByDefault', False) else '*'
if a_scope.get('offByDefault'):
selectedScopes[i] = ' '
elif a_scope.get('roByDefault'):
selectedScopes[i] = 'R'
else:
selectedScopes[i] = '*'
i += 1
prompt = f'\nPlease enter 0-{numScopes-1}[a|r] or {"|".join(OAUTH2_CMDS)}: '
while True:

View File

@@ -368,8 +368,9 @@ _CLIENT_SCOPES = [
'scope': 'https://www.googleapis.com/auth/cloud-identity.orgunits'},
{'name': 'Cloud Identity - Policy',
'api': CLOUDIDENTITY_POLICY,
'subscopes': [],
'scope': 'https://www.googleapis.com/auth/cloud-identity.policies.readonly'
'subscopes': READONLY,
'scope': 'https://www.googleapis.com/auth/cloud-identity.policies',
'roByDefault': True,
},
{'name': 'Cloud Identity User Invitations API',
'api': CLOUDIDENTITY_USERINVITATIONS,
@@ -491,6 +492,7 @@ _CLIENT_SCOPES = [
{'name': 'Site Verification API',
'api': SITEVERIFICATION,
'subscopes': [],
'offByDefault': True,
'scope': 'https://www.googleapis.com/auth/siteverification'},
{'name': 'Sites API',
'api': SITES,