Ensure that customer_id, domain and an admin email address are present for DASA (#1242)

* Ensure that customer_id, domain and an admin email address are present for DASA

* Fix typos
This commit is contained in:
Ross Scroggs
2020-09-18 04:38:38 -07:00
committed by GitHub
parent 00582d486c
commit 597256d048
6 changed files with 51 additions and 14 deletions

View File

@@ -37,7 +37,7 @@ def buildCalendarDataGAPIObject(calname):
if not calname.endswith('.calendar.google.com'):
cal = gam.buildGAPIServiceObject('calendar', calendarId, False)
if cal is None:
_, cal = buildCalendarGAPIObject(gam._getValueFromOAuth('email'))
_, cal = buildCalendarGAPIObject(gam._get_admin_email())
return (calendarId, cal)

View File

@@ -5,5 +5,5 @@ def build(api='cloudidentity'):
return gam.buildGAPIObject(api)
def build_dwd(api='cloudidentity'):
admin = gam._getValueFromOAuth('email')
admin = gam._get_admin_email()
return gam.buildGAPIServiceObject(api, admin, True)

View File

@@ -56,7 +56,7 @@ def showUsageParameters():
kwargs = {}
elif report == 'user':
endpoint = rep.userUsageReport()
kwargs = {'userKey': gam._getValueFromOAuth('email')}
kwargs = {'userKey': gam._get_admin_email()}
else:
controlflow.expected_argument_exit('usageparameters',
['user', 'customer'], report)