From 4e3d57b1b972bc62640aa19793f143887369d615 Mon Sep 17 00:00:00 2001 From: Weves Date: Mon, 8 Jan 2024 15:48:52 -0800 Subject: [PATCH] Disallow Google Drive credential delete if connectors exist --- web/README.md | 2 +- .../app/admin/connectors/google-drive/Credential.tsx | 10 ++++++++++ web/src/app/admin/connectors/google-drive/page.tsx | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/web/README.md b/web/README.md index 63437481f08b..05e94698626d 100644 --- a/web/README.md +++ b/web/README.md @@ -19,5 +19,5 @@ pnpm dev Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. -*Note:* if you are having problems accessing the ^, try setting the `WEB_DOMAIN` env variable to +_Note:_ if you are having problems accessing the ^, try setting the `WEB_DOMAIN` env variable to `http://127.0.0.1:3000` and accessing it there. diff --git a/web/src/app/admin/connectors/google-drive/Credential.tsx b/web/src/app/admin/connectors/google-drive/Credential.tsx index 206601adf5a4..849057e71e34 100644 --- a/web/src/app/admin/connectors/google-drive/Credential.tsx +++ b/web/src/app/admin/connectors/google-drive/Credential.tsx @@ -272,6 +272,7 @@ interface DriveCredentialSectionProps { appCredentialData?: { client_id: string }; setPopup: (popupSpec: PopupSpec | null) => void; refreshCredentials: () => void; + connectorExists: boolean; } export const DriveOAuthSection = ({ @@ -281,6 +282,7 @@ export const DriveOAuthSection = ({ appCredentialData, setPopup, refreshCredentials, + connectorExists, }: DriveCredentialSectionProps) => { const router = useRouter(); @@ -294,6 +296,14 @@ export const DriveOAuthSection = ({