mirror of
https://github.com/GAM-team/GAM.git
synced 2025-07-07 21:23:34 +00:00
define UBER_SCOPES to cut down on unnecessary scope overlap
This commit is contained in:
@ -8686,8 +8686,16 @@ def OAuthInfo():
|
|||||||
# 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
|
||||||
|
|
||||||
|
UBER_SCOPES = {
|
||||||
|
u'gmail-v1': [u'https://mail.google.com/'],
|
||||||
|
u'drive-v2': [u'https://www.googleapis.com/auth/drive']
|
||||||
|
}
|
||||||
|
|
||||||
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():
|
||||||
|
if api_name in UBER_SCOPES.keys():
|
||||||
|
all_apis[api_name][u'use_scopes'] = UBER_SCOPES[api_name]
|
||||||
|
continue
|
||||||
all_apis[api_name][u'use_scopes'] = []
|
all_apis[api_name][u'use_scopes'] = []
|
||||||
scopes = api[u'auth'][u'oauth2'][u'scopes'].keys()
|
scopes = api[u'auth'][u'oauth2'][u'scopes'].keys()
|
||||||
if len(scopes) == 1:
|
if len(scopes) == 1:
|
||||||
|
Reference in New Issue
Block a user