mirror of
https://github.com/GAM-team/GAM.git
synced 2025-07-09 14:13:35 +00:00
Commit Jay's changes
This commit is contained in:
34
src/email-audit-v1.json
Normal file
34
src/email-audit-v1.json
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
{
|
||||||
|
"kind": "discovery#restDescription",
|
||||||
|
"discoveryVersion": "v1",
|
||||||
|
"id": "email-audit:v1",
|
||||||
|
"name": "email-audit",
|
||||||
|
"version": "v1",
|
||||||
|
"revision": "20130823",
|
||||||
|
"title": "Email Audit API",
|
||||||
|
"description": "Lets you peform Google Apps Email Audits",
|
||||||
|
"ownerDomain": "google.com",
|
||||||
|
"ownerName": "Google",
|
||||||
|
"icons": {
|
||||||
|
"x16": "http://www.google.com/images/icons/product/search-16.gif",
|
||||||
|
"x32": "http://www.google.com/images/icons/product/search-32.gif"
|
||||||
|
},
|
||||||
|
"documentationLink": "https://developers.google.com/admin-sdk/email-audit",
|
||||||
|
"protocol": "rest",
|
||||||
|
"baseUrl": "https://apps-apis.google.com/",
|
||||||
|
"rootUrl": "https://apps-apis.google.com/",
|
||||||
|
"servicePath": "/a/feeds/compliance/audit/",
|
||||||
|
"auth": {
|
||||||
|
"oauth2": {
|
||||||
|
"scopes": {
|
||||||
|
"https://apps-apis.google.com/a/feeds/compliance/audit/": {
|
||||||
|
"description": "Manage email audits"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"schemas": {
|
||||||
|
},
|
||||||
|
"resources": {
|
||||||
|
}
|
||||||
|
}
|
34
src/email-settings-v1.json
Normal file
34
src/email-settings-v1.json
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
{
|
||||||
|
"kind": "discovery#restDescription",
|
||||||
|
"discoveryVersion": "v1",
|
||||||
|
"id": "email-settings:v1",
|
||||||
|
"name": "email-settings",
|
||||||
|
"version": "v1",
|
||||||
|
"revision": "20130823",
|
||||||
|
"title": "Email Settings API",
|
||||||
|
"description": "Lets you manage Google Apps Email Settings",
|
||||||
|
"ownerDomain": "google.com",
|
||||||
|
"ownerName": "Google",
|
||||||
|
"icons": {
|
||||||
|
"x16": "http://www.google.com/images/icons/product/search-16.gif",
|
||||||
|
"x32": "http://www.google.com/images/icons/product/search-32.gif"
|
||||||
|
},
|
||||||
|
"documentationLink": "https://developers.google.com/admin-sdk/email-settings",
|
||||||
|
"protocol": "rest",
|
||||||
|
"baseUrl": "https://apps-apis.google.com/",
|
||||||
|
"rootUrl": "https://apps-apis.google.com/",
|
||||||
|
"servicePath": "/a/feeds/emailsettings/2.0/",
|
||||||
|
"auth": {
|
||||||
|
"oauth2": {
|
||||||
|
"scopes": {
|
||||||
|
"https://apps-apis.google.com/a/feeds/emailsettings/2.0/": {
|
||||||
|
"description": "Manage email audits"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"schemas": {
|
||||||
|
},
|
||||||
|
"resources": {
|
||||||
|
}
|
||||||
|
}
|
19
src/gam.py
19
src/gam.py
@ -8707,23 +8707,6 @@ def getUsersToModify(entity_type=None, entity=None, silent=False, return_uids=Fa
|
|||||||
return full_users
|
return full_users
|
||||||
|
|
||||||
def OAuthInfo():
|
def OAuthInfo():
|
||||||
<<<<<<< HEAD
|
|
||||||
access_token = sys.argv[3]
|
|
||||||
oa2 = buildGAPIObject(u'oauth2')
|
|
||||||
token_info = callGAPI(oa2, u'tokeninfo', access_token=access_token)
|
|
||||||
print u"Client ID: %s" % token_info[u'issued_to']
|
|
||||||
try:
|
|
||||||
print u"Secret: %s" % credentials.client_secret
|
|
||||||
except UnboundLocalError:
|
|
||||||
pass
|
|
||||||
print u'Scopes:'
|
|
||||||
for scope in token_info[u'scope'].split(u' '):
|
|
||||||
print u' %s' % scope
|
|
||||||
try:
|
|
||||||
print u'Google Apps Admin: %s' % token_info[u'email']
|
|
||||||
except KeyError:
|
|
||||||
print u'Google Apps Admin: Unknown'
|
|
||||||
=======
|
|
||||||
# TODO eventually would be good if this did something to test admin-selected scopes
|
# TODO eventually would be good if this did something to test admin-selected scopes
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@ -8732,7 +8715,6 @@ UBER_SCOPES = {
|
|||||||
u'drive-v2': [u'https://www.googleapis.com/auth/drive'],
|
u'drive-v2': [u'https://www.googleapis.com/auth/drive'],
|
||||||
u'appsactivity-v1': [u'https://www.googleapis.com/auth/activity']
|
u'appsactivity-v1': [u'https://www.googleapis.com/auth/activity']
|
||||||
}
|
}
|
||||||
>>>>>>> jay0lee/master
|
|
||||||
|
|
||||||
def select_default_scopes(all_apis):
|
def select_default_scopes(all_apis):
|
||||||
for api_name, api in all_apis.items():
|
for api_name, api in all_apis.items():
|
||||||
@ -8764,6 +8746,7 @@ def select_default_scopes(all_apis):
|
|||||||
def doRequestOAuth():
|
def doRequestOAuth():
|
||||||
admin_email = raw_input(u'Please enter your admin email address: ')
|
admin_email = raw_input(u'Please enter your admin email address: ')
|
||||||
apis = API_VER_MAPPING.keys()
|
apis = API_VER_MAPPING.keys()
|
||||||
|
apis.remove(u'oauth2')
|
||||||
all_apis = {}
|
all_apis = {}
|
||||||
for api in apis:
|
for api in apis:
|
||||||
version = getAPIVer(api)
|
version = getAPIVer(api)
|
||||||
|
@ -11,6 +11,8 @@ for d in a.datas:
|
|||||||
a.datas += [('httplib2/cacerts.txt', 'httplib2\cacerts.txt', 'DATA')]
|
a.datas += [('httplib2/cacerts.txt', 'httplib2\cacerts.txt', 'DATA')]
|
||||||
a.datas += [('cloudprint-v2.json', 'cloudprint-v2.json', 'DATA')]
|
a.datas += [('cloudprint-v2.json', 'cloudprint-v2.json', 'DATA')]
|
||||||
a.datas += [('admin-settings-v1.json', 'admin-settings-v1.json', 'DATA')]
|
a.datas += [('admin-settings-v1.json', 'admin-settings-v1.json', 'DATA')]
|
||||||
|
a.datas += [('email-settings-v1.json', 'email-settings-v1.json', 'DATA')]
|
||||||
|
a.datas += [('email-audit-v1.json', 'email-audit-v1.json', 'DATA')]
|
||||||
pyz = PYZ(a.pure)
|
pyz = PYZ(a.pure)
|
||||||
exe = EXE(pyz,
|
exe = EXE(pyz,
|
||||||
a.scripts,
|
a.scripts,
|
||||||
|
Reference in New Issue
Block a user