mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-13 17:22:15 -05:00
* Allow empty username + fix profiles on read (#23924) * Bump STS
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"downloadUrl": "https://github.com/Microsoft/sqltoolsservice/releases/download/{#version#}/microsoft.sqltools.servicelayer-{#fileName#}",
|
||||
"version": "4.8.1.3",
|
||||
"version": "4.8.1.5",
|
||||
"downloadFileNames": {
|
||||
"Windows_86": "win-x86-net7.0.zip",
|
||||
"Windows_64": "win-x64-net7.0.zip",
|
||||
|
||||
@@ -14,6 +14,7 @@ import * as nls from 'vs/nls';
|
||||
import { ConfigurationTarget, IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { deepClone } from 'vs/base/common/objects';
|
||||
import { isDisposable } from 'vs/base/common/lifecycle';
|
||||
import { isUndefinedOrNull } from 'vs/base/common/types';
|
||||
|
||||
export const GROUPS_CONFIG_KEY = 'datasource.connectionGroups';
|
||||
export const CONNECTIONS_CONFIG_KEY = 'datasource.connections';
|
||||
@@ -241,6 +242,11 @@ export class ConnectionConfig {
|
||||
profile.id = generateUuid();
|
||||
changed = true;
|
||||
}
|
||||
// SSMS 19 requires "user", fix any profiles created without user property.
|
||||
if (profile.providerName === 'MSSQL' && isUndefinedOrNull(profile.options.user)) {
|
||||
profile.options.user = '';
|
||||
changed = true;
|
||||
}
|
||||
idsCache[profile.id] = true;
|
||||
}
|
||||
return changed;
|
||||
|
||||
@@ -9,7 +9,7 @@ import { ProviderConnectionInfo } from 'sql/platform/connection/common/providerC
|
||||
import * as interfaces from 'sql/platform/connection/common/interfaces';
|
||||
import { generateUuid } from 'vs/base/common/uuid';
|
||||
import { ICapabilitiesService } from 'sql/platform/capabilities/common/capabilitiesService';
|
||||
import { isString } from 'vs/base/common/types';
|
||||
import { isString, isUndefinedOrNull } from 'vs/base/common/types';
|
||||
import { deepClone } from 'vs/base/common/objects';
|
||||
import * as Constants from 'sql/platform/connection/common/constants';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
@@ -359,7 +359,9 @@ export class ConnectionProfile extends ProviderConnectionInfo implements interfa
|
||||
};
|
||||
|
||||
Object.keys(connectionInfo.options).forEach(element => {
|
||||
if (connectionInfo.options[element] && connectionInfo.options[element] !== null && connectionInfo.options[element] !== '') {
|
||||
// Allow empty strings to ensure "user": "" is populated if empty << Required by SSMS 19.2
|
||||
// Do not change this design until SSMS 19 goes out of support.
|
||||
if (!isUndefinedOrNull(connectionInfo.options[element])) {
|
||||
profile.options[element] = connectionInfo.options[element];
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user