mirror of
https://github.com/GAM-team/GAM.git
synced 2025-07-10 14:43:34 +00:00
switch User Invitations to DwD for now
This commit is contained in:
@ -10326,7 +10326,8 @@ OAUTH2_SCOPES = [
|
|||||||
{
|
{
|
||||||
'name': 'Cloud Identity - User Invitations',
|
'name': 'Cloud Identity - User Invitations',
|
||||||
'subscopes': ['readonly'],
|
'subscopes': ['readonly'],
|
||||||
'scopes': 'https://www.googleapis.com/auth/cloud-identity.userinvitations'
|
'scopes': 'https://www.googleapis.com/auth/cloud-identity.userinvitations',
|
||||||
|
'offByDefault': True,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'name': 'Contact Delegation',
|
'name': 'Contact Delegation',
|
||||||
|
@ -25,7 +25,7 @@ def _reduce_name(name):
|
|||||||
|
|
||||||
def is_invitable_user(email):
|
def is_invitable_user(email):
|
||||||
'''return email isInvitableUser'''
|
'''return email isInvitableUser'''
|
||||||
svc = gapi_cloudidentity.build('cloudidentity_beta')
|
svc = gapi_cloudidentity.build_dwd('cloudidentity_beta')
|
||||||
customer = _get_customerid()
|
customer = _get_customerid()
|
||||||
encoded_email = quote_plus(email)
|
encoded_email = quote_plus(email)
|
||||||
name = f'{customer}/userinvitations/{encoded_email}'
|
name = f'{customer}/userinvitations/{encoded_email}'
|
||||||
@ -35,7 +35,7 @@ def is_invitable_user(email):
|
|||||||
|
|
||||||
def _generic_action(action):
|
def _generic_action(action):
|
||||||
'''generic function to call actionable APIs'''
|
'''generic function to call actionable APIs'''
|
||||||
svc = gapi_cloudidentity.build('cloudidentity_beta')
|
svc = gapi_cloudidentity.build_dwd('cloudidentity_beta')
|
||||||
customer = _get_customerid()
|
customer = _get_customerid()
|
||||||
email = sys.argv[3].lower()
|
email = sys.argv[3].lower()
|
||||||
encoded_email = quote_plus(email)
|
encoded_email = quote_plus(email)
|
||||||
@ -55,7 +55,7 @@ def _generic_action(action):
|
|||||||
|
|
||||||
def _generic_get(get_type):
|
def _generic_get(get_type):
|
||||||
'''generic function to call read data APIs'''
|
'''generic function to call read data APIs'''
|
||||||
svc = gapi_cloudidentity.build('cloudidentity_beta')
|
svc = gapi_cloudidentity.build_dwd('cloudidentity_beta')
|
||||||
customer = _get_customerid()
|
customer = _get_customerid()
|
||||||
email = sys.argv[3].lower()
|
email = sys.argv[3].lower()
|
||||||
encoded_email = quote_plus(email)
|
encoded_email = quote_plus(email)
|
||||||
@ -75,7 +75,7 @@ def bulk_is_invitable(emails):
|
|||||||
if response.get('isInvitableUser'):
|
if response.get('isInvitableUser'):
|
||||||
rows.append({'invitableUsers': request_id})
|
rows.append({'invitableUsers': request_id})
|
||||||
|
|
||||||
svc = gapi_cloudidentity.build('cloudidentity_beta')
|
svc = gapi_cloudidentity.build_dwd('cloudidentity_beta')
|
||||||
customer = _get_customerid()
|
customer = _get_customerid()
|
||||||
todrive = False
|
todrive = False
|
||||||
#batch_size = 1000
|
#batch_size = 1000
|
||||||
@ -139,7 +139,7 @@ USERINVITATION_STATE_CHOICES_MAP = {
|
|||||||
|
|
||||||
def print_():
|
def print_():
|
||||||
'''gam print userinvitations'''
|
'''gam print userinvitations'''
|
||||||
svc = gapi_cloudidentity.build('cloudidentity_beta')
|
svc = gapi_cloudidentity.build_dwd('cloudidentity_beta')
|
||||||
customer = _get_customerid()
|
customer = _get_customerid()
|
||||||
todrive = False
|
todrive = False
|
||||||
titles = ['name', 'state', 'updateTime']
|
titles = ['name', 'state', 'updateTime']
|
||||||
|
@ -8,7 +8,7 @@ import platform
|
|||||||
import re
|
import re
|
||||||
|
|
||||||
GAM_AUTHOR = 'Jay Lee <jay0lee@gmail.com>'
|
GAM_AUTHOR = 'Jay Lee <jay0lee@gmail.com>'
|
||||||
GAM_VERSION = '6.00'
|
GAM_VERSION = '6.01'
|
||||||
GAM_LICENSE = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
|
GAM_LICENSE = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
|
||||||
|
|
||||||
GAM_URL = 'https://git.io/gam'
|
GAM_URL = 'https://git.io/gam'
|
||||||
@ -337,6 +337,7 @@ API_SCOPE_MAPPING = {
|
|||||||
],
|
],
|
||||||
'calendar': ['https://www.googleapis.com/auth/calendar',],
|
'calendar': ['https://www.googleapis.com/auth/calendar',],
|
||||||
'cloudidentity': ['https://www.googleapis.com/auth/cloud-identity'],
|
'cloudidentity': ['https://www.googleapis.com/auth/cloud-identity'],
|
||||||
|
'cloudidentity_beta': ['https://www.googleapis.com/auth/cloud-identity'],
|
||||||
'drive': ['https://www.googleapis.com/auth/drive',],
|
'drive': ['https://www.googleapis.com/auth/drive',],
|
||||||
'drive3': ['https://www.googleapis.com/auth/drive',],
|
'drive3': ['https://www.googleapis.com/auth/drive',],
|
||||||
'gmail': [
|
'gmail': [
|
||||||
|
Reference in New Issue
Block a user