mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-09 01:32:34 -05:00
Add AuthenticationType enum to typings (#20699)
* Add AuthenticationType enum to typings * fix * const * Add comments * fix comment * remove unused
This commit is contained in:
@@ -38,7 +38,7 @@ export class CmsResourceTreeNode extends CmsResourceTreeNodeBase {
|
||||
let nodes: CmsResourceTreeNodeBase[] = [];
|
||||
if (!this.ownerUri) {
|
||||
// Set back password to get ownerUri
|
||||
if (this.connection.options.authenticationType === 'SqlLogin' && this.connection.options.savePassword === true) {
|
||||
if (this.connection.options.authenticationType === azdata.connection.AuthenticationType.SqlLogin && this.connection.options.savePassword === true) {
|
||||
this.connection.options.password = await this.appContext.cmsUtils.getPassword(this.connection.options.user);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ export class RegisteredServerTreeNode extends CmsResourceTreeNodeBase {
|
||||
databaseName: '',
|
||||
userName: undefined as string,
|
||||
password: undefined as string,
|
||||
authenticationType: 'Integrated',
|
||||
authenticationType: azdata.connection.AuthenticationType.Integrated,
|
||||
savePassword: false,
|
||||
groupFullName: '',
|
||||
groupId: '',
|
||||
|
||||
@@ -14,7 +14,6 @@ const localize = nls.loadMessageBundle();
|
||||
const cmsProvider: string = 'MSSQL-CMS';
|
||||
const mssqlProvider: string = 'MSSQL';
|
||||
const CredentialNamespace = 'cmsCredentials';
|
||||
const sqlLoginAuthType: string = 'SqlLogin';
|
||||
|
||||
interface CreateCmsResult {
|
||||
listRegisteredServersResult: mssql.ListRegisteredServersResult;
|
||||
@@ -121,7 +120,7 @@ export class CmsUtils {
|
||||
return cachedServer.name !== cmsServerName;
|
||||
});
|
||||
}
|
||||
if (connection.options.authenticationType === sqlLoginAuthType && connection.options.savePassword) {
|
||||
if (connection.options.authenticationType === azdata.connection.AuthenticationType.SqlLogin && connection.options.savePassword) {
|
||||
this._credentialProvider.deleteCredential(connection.options.user);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user