mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
Fixed CMS connection auth (#5306)
* fixed auth change to reflect in UI * added comments * fix bug where cms shows in dropdown * added parameter to parent call
This commit is contained in:
@@ -29,6 +29,6 @@ export const azureMFA = 'AzureMFA';
|
|||||||
|
|
||||||
/* CMS constants */
|
/* CMS constants */
|
||||||
export const cmsProviderName = 'MSSQL-CMS';
|
export const cmsProviderName = 'MSSQL-CMS';
|
||||||
export const cmsProviderDisplayName = localize('constants.cmsProviderDisplayName', 'Microsoft SQL Server (CMS)');
|
export const cmsProviderDisplayName = localize('constants.cmsProviderDisplayName', 'Microsoft SQL Server - CMS');
|
||||||
|
|
||||||
export const UNSAVED_GROUP_ID = 'unsaved';
|
export const UNSAVED_GROUP_ID = 'unsaved';
|
||||||
|
|||||||
@@ -92,16 +92,15 @@ export class CmsConnectionWidget extends ConnectionWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected addAuthenticationTypeOption(authTypeChanged: boolean = false): void {
|
protected addAuthenticationTypeOption(authTypeChanged: boolean = false): void {
|
||||||
super.addAuthenticationTypeOption();
|
super.addAuthenticationTypeOption(authTypeChanged);
|
||||||
let authTypeOption = this._optionsMaps[ConnectionOptionSpecialType.authType];
|
let authTypeOption = this._optionsMaps[ConnectionOptionSpecialType.authType];
|
||||||
let newAuthTypes = authTypeOption.categoryValues;
|
let newAuthTypes = authTypeOption.categoryValues;
|
||||||
|
// True when opening a CMS dialog to add a registered server
|
||||||
if (authTypeChanged) {
|
if (authTypeChanged) {
|
||||||
|
// Need to filter out SQL Login because registered servers don't support it
|
||||||
newAuthTypes = authTypeOption.categoryValues.filter((option) => option.name !== AuthenticationType.SqlLogin);
|
newAuthTypes = authTypeOption.categoryValues.filter((option) => option.name !== AuthenticationType.SqlLogin);
|
||||||
}
|
authTypeOption.defaultValue = AuthenticationType.Integrated;
|
||||||
if (this._authTypeSelectBox) {
|
|
||||||
this._authTypeSelectBox.setOptions(newAuthTypes.map(c => c.displayName));
|
this._authTypeSelectBox.setOptions(newAuthTypes.map(c => c.displayName));
|
||||||
} else {
|
|
||||||
this._authTypeSelectBox = new SelectBox(newAuthTypes.map(c => c.displayName), authTypeOption.defaultValue, this._contextViewService, undefined, { ariaLabel: authTypeOption.displayName });
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user