mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-27 09:35:37 -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 */
|
||||
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';
|
||||
|
||||
@@ -92,16 +92,15 @@ export class CmsConnectionWidget extends ConnectionWidget {
|
||||
}
|
||||
|
||||
protected addAuthenticationTypeOption(authTypeChanged: boolean = false): void {
|
||||
super.addAuthenticationTypeOption();
|
||||
super.addAuthenticationTypeOption(authTypeChanged);
|
||||
let authTypeOption = this._optionsMaps[ConnectionOptionSpecialType.authType];
|
||||
let newAuthTypes = authTypeOption.categoryValues;
|
||||
// True when opening a CMS dialog to add a registered server
|
||||
if (authTypeChanged) {
|
||||
// Need to filter out SQL Login because registered servers don't support it
|
||||
newAuthTypes = authTypeOption.categoryValues.filter((option) => option.name !== AuthenticationType.SqlLogin);
|
||||
}
|
||||
if (this._authTypeSelectBox) {
|
||||
authTypeOption.defaultValue = AuthenticationType.Integrated;
|
||||
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