mirror of
https://github.com/GAM-team/GAM.git
synced 2026-07-06 13:51:36 +00:00
Don't set consent screen on gam use project (#1095)
This commit is contained in:
@@ -7480,7 +7480,7 @@ def setGAMProjectConsentScreen(httpObj, projectId, login_hint):
|
|||||||
gapi.call(iap.projects().brands(), 'create',
|
gapi.call(iap.projects().brands(), 'create',
|
||||||
parent=f'projects/{projectId}', body=body)
|
parent=f'projects/{projectId}', body=body)
|
||||||
|
|
||||||
def _createClientSecretsOauth2service(httpObj, projectId, login_hint):
|
def _createClientSecretsOauth2service(httpObj, projectId, login_hint, create_project):
|
||||||
|
|
||||||
def _checkClientAndSecret(simplehttp, client_id, client_secret):
|
def _checkClientAndSecret(simplehttp, client_id, client_secret):
|
||||||
url = 'https://oauth2.googleapis.com/token'
|
url = 'https://oauth2.googleapis.com/token'
|
||||||
@@ -7510,6 +7510,7 @@ def _createClientSecretsOauth2service(httpObj, projectId, login_hint):
|
|||||||
|
|
||||||
GAMProjectAPIs = getGAMProjectFile('project-apis.txt').splitlines()
|
GAMProjectAPIs = getGAMProjectFile('project-apis.txt').splitlines()
|
||||||
enableGAMProjectAPIs(GAMProjectAPIs, httpObj, projectId, False)
|
enableGAMProjectAPIs(GAMProjectAPIs, httpObj, projectId, False)
|
||||||
|
if create_project:
|
||||||
setGAMProjectConsentScreen(httpObj, projectId, login_hint)
|
setGAMProjectConsentScreen(httpObj, projectId, login_hint)
|
||||||
iam = googleapiclient.discovery.build('iam', 'v1',
|
iam = googleapiclient.discovery.build('iam', 'v1',
|
||||||
http=httpObj, cache_discovery=False,
|
http=httpObj, cache_discovery=False,
|
||||||
@@ -7805,12 +7806,12 @@ and accept the Terms of Service (ToS). As soon as you've accepted the ToS popup,
|
|||||||
elif 'error' in status:
|
elif 'error' in status:
|
||||||
controlflow.system_error_exit(2, status['error'])
|
controlflow.system_error_exit(2, status['error'])
|
||||||
break
|
break
|
||||||
_createClientSecretsOauth2service(httpObj, projectId, login_hint)
|
_createClientSecretsOauth2service(httpObj, projectId, login_hint, True)
|
||||||
|
|
||||||
def doUseProject():
|
def doUseProject():
|
||||||
_checkForExistingProjectFiles()
|
_checkForExistingProjectFiles()
|
||||||
_, httpObj, login_hint, projectId, _ = _getLoginHintProjectId(False)
|
_, httpObj, login_hint, projectId, _ = _getLoginHintProjectId(False)
|
||||||
_createClientSecretsOauth2service(httpObj, projectId, login_hint)
|
_createClientSecretsOauth2service(httpObj, projectId, login_hint, False)
|
||||||
|
|
||||||
def doUpdateProjects():
|
def doUpdateProjects():
|
||||||
_, httpObj, login_hint, projects, _ = _getLoginHintProjects(False)
|
_, httpObj, login_hint, projects, _ = _getLoginHintProjects(False)
|
||||||
|
|||||||
Reference in New Issue
Block a user