|
|
|
@ -272,6 +272,8 @@ def _configuration_update_helper():
|
|
|
|
|
gdrive_secrets = {}
|
|
|
|
|
gdriveError = gdriveutils.get_error_text(gdrive_secrets)
|
|
|
|
|
if "config_use_google_drive" in to_save and not config.config_use_google_drive and not gdriveError:
|
|
|
|
|
with open(gdriveutils.CLIENT_SECRETS, 'r') as settings:
|
|
|
|
|
gdrive_secrets = json.load(settings)['web']
|
|
|
|
|
if not gdrive_secrets:
|
|
|
|
|
return _configuration_result('client_secrets.json is not configured for web application')
|
|
|
|
|
gdriveutils.update_settings(
|
|
|
|
@ -413,7 +415,8 @@ def _configuration_result(error_flash=None, gdriveError=None):
|
|
|
|
|
if gdriveError:
|
|
|
|
|
gdriveError = _(gdriveError)
|
|
|
|
|
else:
|
|
|
|
|
gdrivefolders = gdriveutils.listRootFolders()
|
|
|
|
|
if config.config_use_google_drive and not gdrive_authenticate:
|
|
|
|
|
gdrivefolders = gdriveutils.listRootFolders()
|
|
|
|
|
|
|
|
|
|
show_back_button = current_user.is_authenticated
|
|
|
|
|
show_login_button = config.db_configured and not current_user.is_authenticated
|
|
|
|
|