From 2ea72dac8a565253f4e66a7d4db6afe552e3a160 Mon Sep 17 00:00:00 2001 From: "Julian@Hasura" <118911427+julian-mayorga@users.noreply.github.com> Date: Tue, 14 Mar 2023 13:19:02 -0300 Subject: [PATCH] console: Remove Read Replicas for BigQuery Connections DSF-109 PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8239 Co-authored-by: Julian <843342+okjulian@users.noreply.github.com> GitOrigin-RevId: b3607ba5d4ec3e8efc409392ea5715adce64b4b4 --- .../components/Services/Data/DataSources/ConnectDatabase.tsx | 4 ++-- frontend/libs/console/legacy-ce/src/lib/utils/permissions.ts | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/DataSources/ConnectDatabase.tsx b/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/DataSources/ConnectDatabase.tsx index 72537a250fc..74101996af2 100644 --- a/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/DataSources/ConnectDatabase.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/DataSources/ConnectDatabase.tsx @@ -402,7 +402,7 @@ const ConnectDatabase: React.FC = props => { {getSupportedDrivers('connectDbForm.read_replicas.edit').includes( connectDBInputState.dbType ) && - canAccessReadReplica() && ( + canAccessReadReplica(connectDBInputState.dbType) && ( = props => { {getSupportedDrivers('connectDbForm.read_replicas.create').includes( connectDBInputState.dbType ) && - canAccessReadReplica() && ( + canAccessReadReplica(connectDBInputState.dbType) && ( isProConsole(window.__env); +export const canAccessReadReplica = (dbType: Driver) => { + return isProConsole(window.__env) && dbType !== 'bigquery'; +}; export const canAccessSecuritySettings = () => isProConsole(window.__env);