From 4b4c5d8ffebb6169813d2b0c4d104d86c31307d4 Mon Sep 17 00:00:00 2001 From: Cheena Malhotra <13396919+cheenamalhotra@users.noreply.github.com> Date: Wed, 26 Oct 2022 16:44:29 -0700 Subject: [PATCH] Change back to existing identity design (#20991) --- src/sql/platform/connection/common/providerConnectionInfo.ts | 2 +- .../connection/test/common/providerConnectionInfo.test.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/sql/platform/connection/common/providerConnectionInfo.ts b/src/sql/platform/connection/common/providerConnectionInfo.ts index e62e765d30..efc192d38c 100644 --- a/src/sql/platform/connection/common/providerConnectionInfo.ts +++ b/src/sql/platform/connection/common/providerConnectionInfo.ts @@ -215,7 +215,7 @@ export class ProviderConnectionInfo extends Disposable implements azdata.Connect let idNames = []; if (this.serverCapabilities) { idNames = this.serverCapabilities.connectionOptions.map(o => { - if ((o.specialValueType || o.isIdentity || o.showOnConnectionDialog) + if ((o.specialValueType || o.isIdentity) && o.specialValueType !== ConnectionOptionSpecialType.password && o.specialValueType !== ConnectionOptionSpecialType.connectionName) { return o.name; diff --git a/src/sql/platform/connection/test/common/providerConnectionInfo.test.ts b/src/sql/platform/connection/test/common/providerConnectionInfo.test.ts index 88c526bd5c..6221c48072 100644 --- a/src/sql/platform/connection/test/common/providerConnectionInfo.test.ts +++ b/src/sql/platform/connection/test/common/providerConnectionInfo.test.ts @@ -216,10 +216,11 @@ suite('SQL ProviderConnectionInfo tests', () => { test('getOptionsKey should create a valid unique id', () => { let options: { [key: string]: string } = {}; + // Setting custom options are not yet considered for profile identity options['encrypt'] = 'true'; connectionProfile.options = options; let conn = new ProviderConnectionInfo(capabilitiesService, connectionProfile); - let expectedId = 'providerName:MSSQL|authenticationType:|databaseName:database|encrypt:true|serverName:new server|userName:user'; + let expectedId = 'providerName:MSSQL|authenticationType:|databaseName:database|serverName:new server|userName:user'; let id = conn.getOptionsKey(); assert.strictEqual(id, expectedId); });