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:
Aditya Bist
2019-05-03 13:26:04 -07:00
committed by GitHub
parent f5d13319a2
commit a69f194d8b
2 changed files with 5 additions and 6 deletions

View File

@@ -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 });
}
}