diff --git a/plugins/ui/apps/portal/src/axios/db-credentials-mgr.ts b/plugins/ui/apps/portal/src/axios/db-credentials-mgr.ts index 55b19f92e8..59d519e539 100644 --- a/plugins/ui/apps/portal/src/axios/db-credentials-mgr.ts +++ b/plugins/ui/apps/portal/src/axios/db-credentials-mgr.ts @@ -5,6 +5,7 @@ import { INewDatabase, IDatabaseDetailsUpdate, IDatabaseResponse, + AUTHENTICATION_MODES, SERVICE_SCOPE_TYPES, ITestConnection, ITestConnectionResult, @@ -37,7 +38,7 @@ export class DbCredentialsMgr { return { ...omit(d, "db_extra", "authentication_mode", "vocab_schemas"), extra: [{ value: internalValue, serviceScope: SERVICE_SCOPE_TYPES.INTERNAL }], - authenticationMode: d.authentication_mode, + authenticationMode: AUTHENTICATION_MODES.PASSWORD, vocabSchemas: d.vocab_schemas, hasLegacyExtra, }; diff --git a/plugins/ui/apps/portal/src/plugins/Setup/Db/EditDbCredentialsDialog/EditDbCredentialsDialog.tsx b/plugins/ui/apps/portal/src/plugins/Setup/Db/EditDbCredentialsDialog/EditDbCredentialsDialog.tsx index 04bf22d7df..bdfc14935a 100644 --- a/plugins/ui/apps/portal/src/plugins/Setup/Db/EditDbCredentialsDialog/EditDbCredentialsDialog.tsx +++ b/plugins/ui/apps/portal/src/plugins/Setup/Db/EditDbCredentialsDialog/EditDbCredentialsDialog.tsx @@ -80,8 +80,7 @@ export const EditDbCredentialsDialog: FC = ({ open, useEffect(() => { if (open) { - const { authenticationMode } = db; - setFormData({ ...EMPTY_FORM_DATA, authenticationMode }); + setFormData({ ...EMPTY_FORM_DATA, authenticationMode: AUTHENTICATION_MODES.PASSWORD }); setFeedback({}); setLoading(false); } @@ -237,7 +236,7 @@ export const EditDbCredentialsDialog: FC = ({ open, title={getText(i18nKeys.EDIT_DB_CREDENTIAL_DIALOG__EDIT_DATABASE_CREDENTIALS)} closable fullWidth - maxWidth={formData.authenticationMode === AUTHENTICATION_MODES.JWT ? "sm" : "md"} + maxWidth="md" open={open} onClose={() => handleClose("cancelled")} feedback={feedback} diff --git a/plugins/ui/apps/portal/src/types/dbCredentials.ts b/plugins/ui/apps/portal/src/types/dbCredentials.ts index e9d4e84a5c..51a8af8dee 100644 --- a/plugins/ui/apps/portal/src/types/dbCredentials.ts +++ b/plugins/ui/apps/portal/src/types/dbCredentials.ts @@ -26,7 +26,6 @@ export const DB_DIALECTS_KEY_VALUE = [ export enum AUTHENTICATION_MODES { PASSWORD = "Password", - JWT = "JWT", } export type AuthenticationMode = `${AUTHENTICATION_MODES}`; @@ -54,7 +53,6 @@ export interface IDatabaseResponse { name: string; dialect: DbDialect; db_extra: any; - authentication_mode: AuthenticationMode; credentials: IDbCredential[]; vocab_schemas: string[]; publications: IDbPublication[];