mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-16 17:22:29 -05:00
Support for MongoDB clusters / vCore (#22512)
* Initial support for MongoDB clusters / vCore * Get cluster connection string from arm * Preserve Azure account for any auth type When a service has been selected through the Azure browser, we want to preserve the Azure account information even if a different authentication has been selected. This allows doing ARM operations using the signed in Azure account for any resources including those with a different login types such as clusters.
This commit is contained in:
@@ -974,9 +974,9 @@ export class ConnectionWidget extends lifecycle.Disposable {
|
||||
});
|
||||
}
|
||||
|
||||
if (this.authType === AuthenticationType.AzureMFA || this.authType === AuthenticationType.AzureMFAAndUser) {
|
||||
if (this.authType === AuthenticationType.AzureMFA || this.authType === AuthenticationType.AzureMFAAndUser || connectionInfo.azureAccount !== null) {
|
||||
this.fillInAzureAccountOptions().then(async () => {
|
||||
let accountName = (this.authType === AuthenticationType.AzureMFA)
|
||||
let accountName = ((this.authType === AuthenticationType.AzureMFA) || connectionInfo.azureAccount !== null)
|
||||
? connectionInfo.azureAccount : connectionInfo.userName;
|
||||
let account: azdata.Account;
|
||||
if (accountName) {
|
||||
@@ -1262,7 +1262,11 @@ export class ConnectionWidget extends lifecycle.Disposable {
|
||||
model.userName = this.userName;
|
||||
model.password = this.password;
|
||||
model.authenticationType = this.authenticationType;
|
||||
model.azureAccount = this.authToken;
|
||||
const azureAccount = this.authToken;
|
||||
if (azureAccount) {
|
||||
// set the azureAccount only if one has been selected, otherwise preserve the initial model value
|
||||
model.azureAccount = azureAccount;
|
||||
}
|
||||
model.savePassword = this._rememberPasswordCheckBox.checked;
|
||||
model.databaseName = this.databaseName;
|
||||
if (this._customOptionWidgets) {
|
||||
|
||||
Reference in New Issue
Block a user