diff --git a/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/EncryptedField.tsx b/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/EncryptedField.tsx index ad80699802e..6bddee3c922 100644 --- a/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/EncryptedField.tsx +++ b/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/EncryptedField.tsx @@ -19,11 +19,10 @@ import { useRef, useState } from 'react'; import { SupersetTheme, t } from '@superset-ui/core'; import { Button, AntdSelect } from 'src/components'; -import InfoTooltip from 'src/components/InfoTooltip'; import FormLabel from 'src/components/Form/FormLabel'; import Icons from 'src/components/Icons'; import { DatabaseParameters, FieldPropTypes } from '../../types'; -import { infoTooltip, labelMarginBottom, CredentialInfoForm } from '../styles'; +import { infoTooltip, CredentialInfoForm } from '../styles'; enum CredentialInfoOptions { JsonUpload, @@ -38,8 +37,6 @@ export const encryptedCredentialsMap = { bigquery: 'credentials_info', }; -const castStringToBoolean = (optionValue: string) => optionValue === 'true'; - export const EncryptedField = ({ changeMethods, isEditMode, @@ -53,10 +50,7 @@ export const EncryptedField = ({ const [fileToUpload, setFileToUpload] = useState( null, ); - const [isPublic, setIsPublic] = useState(true); - const showCredentialsInfo = - db?.engine === 'gsheets' ? !isEditMode && !isPublic : !isEditMode; - const isEncrypted = isEditMode && db?.masked_encrypted_extra !== '{}'; + const showCredentialsInfo = !isEditMode; const encryptedField = db?.engine && encryptedCredentialsMap[db.engine as keyof typeof encryptedCredentialsMap]; @@ -68,33 +62,9 @@ export const EncryptedField = ({ : paramValue; return ( - {db?.engine === 'gsheets' && ( -
- labelMarginBottom(theme)} - required - > - {t('Type of Google Sheets allowed')} - - - setIsPublic(castStringToBoolean(value)) - } - > - - {t('Publicly shared sheets only')} - - - {t('Public and privately shared sheets')} - - -
- )} {showCredentialsInfo && ( <> - + {t('How do you want to enter service account credentials?')} - {t('Service Account')} + {t('Service Account')}