Merge pull request #9287 from taylorwilsdon/authenticate_gooogle_settings

fix: Restrict Google Drive credentials to authenticated users
This commit is contained in:
Timothy Jaeryang Baek 2025-02-03 13:40:39 -08:00 committed by GitHub
commit 5c0854c6b3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1008,10 +1008,6 @@ async def get_app_config(request: Request):
else {}
),
},
"google_drive": {
"client_id": GOOGLE_DRIVE_CLIENT_ID.value,
"api_key": GOOGLE_DRIVE_API_KEY.value,
},
**(
{
"default_models": app.state.config.DEFAULT_MODELS,
@ -1031,6 +1027,10 @@ async def get_app_config(request: Request):
"max_count": app.state.config.FILE_MAX_COUNT,
},
"permissions": {**app.state.config.USER_PERMISSIONS},
"google_drive": {
"client_id": GOOGLE_DRIVE_CLIENT_ID.value,
"api_key": GOOGLE_DRIVE_API_KEY.value,
},
}
if user is not None
else {}