Guest account connection issue while using (#8726)

AAD authentication
This commit is contained in:
osmant
2019-12-18 12:13:46 -08:00
committed by Karl Burtram
parent e181cf2fcd
commit 48dcb7258e
3 changed files with 18 additions and 1 deletions

View File

@@ -51,7 +51,8 @@ export class ConnectionController implements IConnectionComponentController {
onFetchDatabases: (serverName: string, authenticationType: string, userName?: string, password?: string) => this.onFetchDatabases(
serverName, authenticationType, userName, password).then(result => {
return result;
})
}),
onAzureTenantSelection: (azureTenantId?: string) => this.onAzureTenantSelection(azureTenantId),
}, providerName);
this._providerName = providerName;
}
@@ -104,6 +105,20 @@ export class ConnectionController implements IConnectionComponentController {
}
}
protected onAzureTenantSelection(azureTenantId?: string): void {
if (this._model.options.azureAccountToken !== undefined) {
this._model.options.azureAccountToken = undefined;
}
if (this._model.azureTenantId !== azureTenantId) {
this._model.azureTenantId = azureTenantId;
}
if (this._model.options.azureTenantId !== azureTenantId) {
this._model.azureTenantId = azureTenantId;
}
}
protected handleOnAdvancedProperties(): void {
if (!this._advancedController) {
this._advancedController = this._instantiationService.createInstance(AdvancedPropertiesController, () => this._connectionWidget.focusOnAdvancedButton());