mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Azure core | Include alternate library accounts if found (#21565)
This commit is contained in:
@@ -17,7 +17,7 @@ import { AzureResourceServiceNames } from './constants';
|
||||
import { AzureAccount, Tenant, azureResource } from 'azurecore';
|
||||
import { FlatAccountTreeNode } from './tree/flatAccountTreeNode';
|
||||
import { ConnectionDialogTreeProvider } from './tree/connectionDialogTreeProvider';
|
||||
import { AzureResourceErrorMessageUtil } from './utils';
|
||||
import { AzureResourceErrorMessageUtil, filterAccounts } from './utils';
|
||||
|
||||
export function registerAzureResourceCommands(appContext: AppContext, azureViewTree: AzureResourceTreeProvider, connectionDialogTree: ConnectionDialogTreeProvider, authLibrary: string): void {
|
||||
const trees = [azureViewTree, connectionDialogTree];
|
||||
@@ -33,7 +33,7 @@ export function registerAzureResourceCommands(appContext: AppContext, azureViewT
|
||||
if (node instanceof AzureResourceAccountTreeNode) {
|
||||
azureAccount = node.account;
|
||||
} else {
|
||||
let accounts = await azdata.accounts.getAllAccounts();
|
||||
let accounts = filterAccounts(await azdata.accounts.getAllAccounts(), authLibrary);
|
||||
accounts = accounts.filter(a => a.key.providerId.startsWith('azure'));
|
||||
if (accounts.length === 0) {
|
||||
const signin = localize('azure.signIn', "Sign in");
|
||||
|
||||
Reference in New Issue
Block a user