mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
Show user email address in account picker (#5015)
* Show user email address in account picker * Fix build break and remove Azure account from sqlops namespace
This commit is contained in:
@@ -433,6 +433,7 @@ export class AzureAccountProvider implements azdata.AccountProvider {
|
|||||||
name: tokenResponse.userId,
|
name: tokenResponse.userId,
|
||||||
displayInfo: {
|
displayInfo: {
|
||||||
accountType: accountType,
|
accountType: accountType,
|
||||||
|
userId: tokenResponse.userId,
|
||||||
contextualDisplayName: contextualDisplayName,
|
contextualDisplayName: contextualDisplayName,
|
||||||
displayName: displayName
|
displayName: displayName
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -32,7 +32,8 @@ const mockAccount: azdata.Account = {
|
|||||||
displayInfo: {
|
displayInfo: {
|
||||||
displayName: 'mock_account@test.com',
|
displayName: 'mock_account@test.com',
|
||||||
accountType: 'Microsoft',
|
accountType: 'Microsoft',
|
||||||
contextualDisplayName: 'test'
|
contextualDisplayName: 'test',
|
||||||
|
userId: 'test@email.com'
|
||||||
},
|
},
|
||||||
properties: undefined,
|
properties: undefined,
|
||||||
isStale: false
|
isStale: false
|
||||||
|
|||||||
@@ -32,7 +32,8 @@ const mockAccount: azdata.Account = {
|
|||||||
displayInfo: {
|
displayInfo: {
|
||||||
displayName: 'mock_account@test.com',
|
displayName: 'mock_account@test.com',
|
||||||
accountType: 'Microsoft',
|
accountType: 'Microsoft',
|
||||||
contextualDisplayName: 'test'
|
contextualDisplayName: 'test',
|
||||||
|
userId: 'test@email.com'
|
||||||
},
|
},
|
||||||
properties: undefined,
|
properties: undefined,
|
||||||
isStale: false
|
isStale: false
|
||||||
|
|||||||
@@ -23,7 +23,8 @@ const mockAccount: azdata.Account = {
|
|||||||
displayInfo: {
|
displayInfo: {
|
||||||
displayName: 'mock_account@test.com',
|
displayName: 'mock_account@test.com',
|
||||||
accountType: 'Microsoft',
|
accountType: 'Microsoft',
|
||||||
contextualDisplayName: 'test'
|
contextualDisplayName: 'test',
|
||||||
|
userId: 'test@email.com'
|
||||||
},
|
},
|
||||||
properties: undefined,
|
properties: undefined,
|
||||||
isStale: false
|
isStale: false
|
||||||
|
|||||||
@@ -26,7 +26,8 @@ const mockAccount: azdata.Account = {
|
|||||||
displayInfo: {
|
displayInfo: {
|
||||||
displayName: 'mock_account@test.com',
|
displayName: 'mock_account@test.com',
|
||||||
accountType: 'Microsoft',
|
accountType: 'Microsoft',
|
||||||
contextualDisplayName: 'test'
|
contextualDisplayName: 'test',
|
||||||
|
userId: 'test@email.com'
|
||||||
},
|
},
|
||||||
properties: undefined,
|
properties: undefined,
|
||||||
isStale: false
|
isStale: false
|
||||||
|
|||||||
@@ -50,7 +50,8 @@ const mockAccount: azdata.Account = {
|
|||||||
displayInfo: {
|
displayInfo: {
|
||||||
displayName: 'mock_account@test.com',
|
displayName: 'mock_account@test.com',
|
||||||
accountType: 'Microsoft',
|
accountType: 'Microsoft',
|
||||||
contextualDisplayName: 'test'
|
contextualDisplayName: 'test',
|
||||||
|
userId: 'test@email.com'
|
||||||
},
|
},
|
||||||
properties: {
|
properties: {
|
||||||
tenants: [
|
tenants: [
|
||||||
|
|||||||
@@ -40,7 +40,8 @@ const mockAccount: azdata.Account = {
|
|||||||
displayInfo: {
|
displayInfo: {
|
||||||
displayName: 'mock_account@test.com',
|
displayName: 'mock_account@test.com',
|
||||||
accountType: 'Microsoft',
|
accountType: 'Microsoft',
|
||||||
contextualDisplayName: 'test'
|
contextualDisplayName: 'test',
|
||||||
|
userId: 'test@email.com'
|
||||||
},
|
},
|
||||||
properties: undefined,
|
properties: undefined,
|
||||||
isStale: false
|
isStale: false
|
||||||
|
|||||||
@@ -38,7 +38,8 @@ const mockAccount1: azdata.Account = {
|
|||||||
displayInfo: {
|
displayInfo: {
|
||||||
displayName: 'mock_account_1@test.com',
|
displayName: 'mock_account_1@test.com',
|
||||||
accountType: 'Microsoft',
|
accountType: 'Microsoft',
|
||||||
contextualDisplayName: 'test'
|
contextualDisplayName: 'test',
|
||||||
|
userId: 'test@email.com'
|
||||||
},
|
},
|
||||||
properties: undefined,
|
properties: undefined,
|
||||||
isStale: false
|
isStale: false
|
||||||
@@ -51,7 +52,8 @@ const mockAccount2: azdata.Account = {
|
|||||||
displayInfo: {
|
displayInfo: {
|
||||||
displayName: 'mock_account_2@test.com',
|
displayName: 'mock_account_2@test.com',
|
||||||
accountType: 'Microsoft',
|
accountType: 'Microsoft',
|
||||||
contextualDisplayName: 'test'
|
contextualDisplayName: 'test',
|
||||||
|
userId: 'test@email.com'
|
||||||
},
|
},
|
||||||
properties: undefined,
|
properties: undefined,
|
||||||
isStale: false
|
isStale: false
|
||||||
|
|||||||
7
src/sql/azdata.proposed.d.ts
vendored
7
src/sql/azdata.proposed.d.ts
vendored
@@ -2055,9 +2055,14 @@ declare module 'azdata' {
|
|||||||
accountType: string;
|
accountType: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A display name that identifies the account, such as "user@contoso.com".
|
* A display name that identifies the account, such as "User Name".
|
||||||
*/
|
*/
|
||||||
displayName: string;
|
displayName: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* User id that identifies the account, such as "user@contoso.com".
|
||||||
|
*/
|
||||||
|
userId: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -69,7 +69,14 @@ export class AccountPickerListRenderer implements IListRenderer<azdata.Account,
|
|||||||
templateData.icon.classList.add('account-logo', account.displayInfo.accountType);
|
templateData.icon.classList.add('account-logo', account.displayInfo.accountType);
|
||||||
|
|
||||||
templateData.contextualDisplayName.innerText = account.displayInfo.contextualDisplayName;
|
templateData.contextualDisplayName.innerText = account.displayInfo.contextualDisplayName;
|
||||||
templateData.displayName.innerText = account.displayInfo.displayName;
|
|
||||||
|
// show the account display name text, something like "User Name (user@email.com)"
|
||||||
|
if (account.displayInfo.userId && account.displayInfo.displayName) {
|
||||||
|
templateData.displayName.innerText = account.displayInfo.displayName + ' (' + account.displayInfo.userId + ')';
|
||||||
|
} else {
|
||||||
|
templateData.displayName.innerText = account.displayInfo.displayName ;
|
||||||
|
}
|
||||||
|
|
||||||
if (account.isStale) {
|
if (account.isStale) {
|
||||||
templateData.badgeContent.className = 'badge-content icon warning-badge';
|
templateData.badgeContent.className = 'badge-content icon warning-badge';
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
258
src/sql/sqlops.d.ts
vendored
258
src/sql/sqlops.d.ts
vendored
@@ -1994,269 +1994,11 @@ declare module 'sqlops' {
|
|||||||
message: string;
|
message: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ACCOUNT MANAGEMENT //////////////////////////////////////////////////
|
|
||||||
export namespace accounts {
|
|
||||||
export function registerAccountProvider(providerMetadata: AccountProviderMetadata, provider: AccountProvider): vscode.Disposable;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Launches a flyout dialog that will display the information on how to complete device
|
|
||||||
* code OAuth login to the user. Only one flyout can be opened at once and each must be closed
|
|
||||||
* by calling {@link endAutoOAuthDeviceCode}.
|
|
||||||
* @param {string} providerId ID of the provider that's requesting the flyout be opened
|
|
||||||
* @param {string} title
|
|
||||||
* @param {string} message
|
|
||||||
* @param {string} userCode
|
|
||||||
* @param {string} uri
|
|
||||||
*/
|
|
||||||
export function beginAutoOAuthDeviceCode(providerId: string, title: string, message: string, userCode: string, uri: string): Thenable<void>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Closes the flyout dialog opened by {@link beginAutoOAuthDeviceCode}
|
|
||||||
*/
|
|
||||||
export function endAutoOAuthDeviceCode(): void;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Notifies the account management service that an account has updated (usually due to the
|
|
||||||
* account going stale).
|
|
||||||
* @param {Account} updatedAccount Account object with updated properties
|
|
||||||
*/
|
|
||||||
export function accountUpdated(updatedAccount: Account): void;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets all added accounts.
|
|
||||||
* @returns {Thenable<Account>} Promise to return the accounts
|
|
||||||
*/
|
|
||||||
export function getAllAccounts(): Thenable<Account[]>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Generates a security token by asking the account's provider
|
|
||||||
* @param {Account} account Account to generate security token for (defaults to
|
|
||||||
* AzureResource.ResourceManagement if not given)
|
|
||||||
* @return {Thenable<{}>} Promise to return the security token
|
|
||||||
*/
|
|
||||||
export function getSecurityToken(account: Account, resource?: AzureResource): Thenable<{}>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* An [event](#Event) which fires when the accounts have changed.
|
|
||||||
*/
|
|
||||||
export const onDidChangeAccounts: vscode.Event<DidChangeAccountsParams>;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Represents display information for an account.
|
|
||||||
*/
|
|
||||||
export interface AccountDisplayInfo {
|
|
||||||
/**
|
|
||||||
* A display name that offers context for the account, such as "Contoso".
|
|
||||||
*/
|
|
||||||
contextualDisplayName: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* account provider (eg, Work/School vs Microsoft Account)
|
|
||||||
*/
|
|
||||||
accountType: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A display name that identifies the account, such as "user@contoso.com".
|
|
||||||
*/
|
|
||||||
displayName: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Represents a key that identifies an account.
|
|
||||||
*/
|
|
||||||
export interface AccountKey {
|
|
||||||
/**
|
|
||||||
* Identifier of the provider
|
|
||||||
*/
|
|
||||||
providerId: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Any arguments that identify an instantiation of the provider
|
|
||||||
*/
|
|
||||||
providerArgs?: any;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Identifier for the account, unique to the provider
|
|
||||||
*/
|
|
||||||
accountId: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Represents an account.
|
|
||||||
*/
|
|
||||||
export interface Account {
|
|
||||||
/**
|
|
||||||
* The key that identifies the account
|
|
||||||
*/
|
|
||||||
key: AccountKey;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Display information for the account
|
|
||||||
*/
|
|
||||||
displayInfo: AccountDisplayInfo;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Custom properties stored with the account
|
|
||||||
*/
|
|
||||||
properties: any;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Indicates if the account needs refreshing
|
|
||||||
*/
|
|
||||||
isStale: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
export enum AzureResource {
|
export enum AzureResource {
|
||||||
ResourceManagement = 0,
|
ResourceManagement = 0,
|
||||||
Sql = 1
|
Sql = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface DidChangeAccountsParams {
|
|
||||||
// Updated accounts
|
|
||||||
accounts: Account[];
|
|
||||||
}
|
|
||||||
|
|
||||||
// - ACCOUNT PROVIDER //////////////////////////////////////////////////
|
|
||||||
/**
|
|
||||||
* Error to be used when the user has cancelled the prompt or refresh methods. When
|
|
||||||
* AccountProvider.refresh or AccountProvider.prompt are rejected with this error, the error
|
|
||||||
* will not be reported to the user.
|
|
||||||
*/
|
|
||||||
export interface UserCancelledSignInError extends Error {
|
|
||||||
/**
|
|
||||||
* Type guard for differentiating user cancelled sign in errors from other errors
|
|
||||||
*/
|
|
||||||
userCancelledSignIn: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Represents a provider of accounts.
|
|
||||||
*/
|
|
||||||
export interface AccountProviderMetadata {
|
|
||||||
/**
|
|
||||||
* The identifier of the provider
|
|
||||||
*/
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Display name of the provider
|
|
||||||
*/
|
|
||||||
displayName: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Any arguments that identify an instantiation of the provider
|
|
||||||
*/
|
|
||||||
args?: any;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Optional settings that identify an instantiation of a provider
|
|
||||||
*/
|
|
||||||
settings?: {};
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Represents a provider of accounts for use with the account management service
|
|
||||||
*/
|
|
||||||
export interface AccountProvider {
|
|
||||||
/**
|
|
||||||
* Initializes the account provider with the accounts restored from the memento,
|
|
||||||
* @param {Account[]} storedAccounts Accounts restored from the memento
|
|
||||||
* @return {Thenable<Account[]>} Account objects after being rehydrated (if necessary)
|
|
||||||
*/
|
|
||||||
initialize(storedAccounts: Account[]): Thenable<Account[]>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Generates a security token for the provided account
|
|
||||||
* @param {Account} account The account to generate a security token for
|
|
||||||
* @param {AzureResource} resource The resource to get the token for
|
|
||||||
* @return {Thenable<{}>} Promise to return a security token object
|
|
||||||
*/
|
|
||||||
getSecurityToken(account: Account, resource: AzureResource): Thenable<{}>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Prompts the user to enter account information.
|
|
||||||
* Returns an error if the user canceled the operation.
|
|
||||||
*/
|
|
||||||
prompt(): Thenable<Account>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Refreshes a stale account.
|
|
||||||
* Returns an error if the user canceled the operation.
|
|
||||||
* Otherwise, returns a new updated account instance.
|
|
||||||
* @param account - An account.
|
|
||||||
*/
|
|
||||||
refresh(account: Account): Thenable<Account>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Clears sensitive information for an account. To be called when account is removed
|
|
||||||
* @param accountKey - Key that uniquely identifies the account to clear
|
|
||||||
*/
|
|
||||||
clear(accountKey: AccountKey): Thenable<void>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called from the account management service when the user has cancelled an auto OAuth
|
|
||||||
* authorization process. Implementations should use this to cancel any polling process
|
|
||||||
* and call the end OAuth method.
|
|
||||||
*/
|
|
||||||
autoOAuthCancelled(): Thenable<void>;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Resource provider interfaces -----------------------------------------------------------------------
|
|
||||||
|
|
||||||
// - ACCOUNT PROVIDER //////////////////////////////////////////////////
|
|
||||||
/**
|
|
||||||
* Represents a provider of accounts.
|
|
||||||
*/
|
|
||||||
export interface ResourceProviderMetadata {
|
|
||||||
/**
|
|
||||||
* The identifier of the provider
|
|
||||||
*/
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Display name of the provider
|
|
||||||
*/
|
|
||||||
displayName: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Optional settings that identify an instantiation of a provider
|
|
||||||
*/
|
|
||||||
settings?: {};
|
|
||||||
}
|
|
||||||
|
|
||||||
export namespace resources {
|
|
||||||
/**
|
|
||||||
* Registers a resource provider that can suport
|
|
||||||
*/
|
|
||||||
export function registerResourceProvider(providerMetadata: ResourceProviderMetadata, provider: ResourceProvider): vscode.Disposable;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Represents a provider of resource
|
|
||||||
*/
|
|
||||||
export interface ResourceProvider {
|
|
||||||
createFirewallRule(account: Account, firewallruleInfo: FirewallRuleInfo): Thenable<CreateFirewallRuleResponse>;
|
|
||||||
handleFirewallRule(errorCode: number, errorMessage: string, connectionTypeId: string): Thenable<HandleFirewallRuleResponse>;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface FirewallRuleInfo {
|
|
||||||
startIpAddress: string;
|
|
||||||
endIpAddress: string;
|
|
||||||
serverName: string;
|
|
||||||
securityTokenMappings: {};
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface CreateFirewallRuleResponse {
|
|
||||||
result: boolean;
|
|
||||||
errorMessage: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface HandleFirewallRuleResponse {
|
|
||||||
result: boolean;
|
|
||||||
ipAddress: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ModalDialog {
|
export interface ModalDialog {
|
||||||
/**
|
/**
|
||||||
* Title of the webview.
|
* Title of the webview.
|
||||||
|
|||||||
@@ -531,30 +531,6 @@ export function createApiFactory(
|
|||||||
|
|
||||||
// "sqlops" namespace provided for back-compat only, add new interfaces to "azdata"
|
// "sqlops" namespace provided for back-compat only, add new interfaces to "azdata"
|
||||||
sqlopsFactory: function (extension: IExtensionDescription): typeof sqlops {
|
sqlopsFactory: function (extension: IExtensionDescription): typeof sqlops {
|
||||||
// namespace: accounts
|
|
||||||
const accounts: typeof sqlops.accounts = {
|
|
||||||
registerAccountProvider(providerMetadata: sqlops.AccountProviderMetadata, provider: sqlops.AccountProvider): vscode.Disposable {
|
|
||||||
return extHostAccountManagement.$registerAccountProvider(providerMetadata, provider);
|
|
||||||
},
|
|
||||||
beginAutoOAuthDeviceCode(providerId: string, title: string, message: string, userCode: string, uri: string): Thenable<void> {
|
|
||||||
return extHostAccountManagement.$beginAutoOAuthDeviceCode(providerId, title, message, userCode, uri);
|
|
||||||
},
|
|
||||||
endAutoOAuthDeviceCode(): void {
|
|
||||||
return extHostAccountManagement.$endAutoOAuthDeviceCode();
|
|
||||||
},
|
|
||||||
accountUpdated(updatedAccount: sqlops.Account): void {
|
|
||||||
return extHostAccountManagement.$accountUpdated(updatedAccount);
|
|
||||||
},
|
|
||||||
getAllAccounts(): Thenable<sqlops.Account[]> {
|
|
||||||
return extHostAccountManagement.$getAllAccounts();
|
|
||||||
},
|
|
||||||
getSecurityToken(account: sqlops.Account, resource?: sqlops.AzureResource): Thenable<{}> {
|
|
||||||
return extHostAccountManagement.$getSecurityToken(account, resource);
|
|
||||||
},
|
|
||||||
onDidChangeAccounts(listener: (e: sqlops.DidChangeAccountsParams) => void, thisArgs?: any, disposables?: extHostTypes.Disposable[]) {
|
|
||||||
return extHostAccountManagement.onDidChangeAccounts(listener, thisArgs, disposables);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// namespace: connection
|
// namespace: connection
|
||||||
const connection: typeof sqlops.connection = {
|
const connection: typeof sqlops.connection = {
|
||||||
@@ -623,12 +599,6 @@ export function createApiFactory(
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
// namespace: serialization
|
|
||||||
const resources: typeof sqlops.resources = {
|
|
||||||
registerResourceProvider(providerMetadata: sqlops.ResourceProviderMetadata, provider: sqlops.ResourceProvider): vscode.Disposable {
|
|
||||||
return extHostResourceProvider.$registerResourceProvider(providerMetadata, provider);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
let registerConnectionProvider = (provider: sqlops.ConnectionProvider): vscode.Disposable => {
|
let registerConnectionProvider = (provider: sqlops.ConnectionProvider): vscode.Disposable => {
|
||||||
// Connection callbacks
|
// Connection callbacks
|
||||||
@@ -955,11 +925,9 @@ export function createApiFactory(
|
|||||||
};
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
accounts,
|
|
||||||
connection,
|
connection,
|
||||||
credentials,
|
credentials,
|
||||||
objectexplorer: objectExplorer,
|
objectexplorer: objectExplorer,
|
||||||
resources,
|
|
||||||
serialization,
|
serialization,
|
||||||
dataprotocol,
|
dataprotocol,
|
||||||
DataProviderType: sqlExtHostTypes.DataProviderType,
|
DataProviderType: sqlExtHostTypes.DataProviderType,
|
||||||
|
|||||||
@@ -71,7 +71,8 @@ suite('Account picker service tests', () => {
|
|||||||
displayInfo: {
|
displayInfo: {
|
||||||
contextualDisplayName: 'Microsoft Account',
|
contextualDisplayName: 'Microsoft Account',
|
||||||
accountType: 'microsoft',
|
accountType: 'microsoft',
|
||||||
displayName: 'Account 1'
|
displayName: 'Account 1',
|
||||||
|
userId: 'user@email.com'
|
||||||
},
|
},
|
||||||
properties: [],
|
properties: [],
|
||||||
isStale: false
|
isStale: false
|
||||||
|
|||||||
@@ -31,7 +31,8 @@ suite('Account picker view model tests', () => {
|
|||||||
displayInfo: {
|
displayInfo: {
|
||||||
contextualDisplayName: 'Microsoft Account',
|
contextualDisplayName: 'Microsoft Account',
|
||||||
accountType: 'microsoft',
|
accountType: 'microsoft',
|
||||||
displayName: 'Account 1'
|
displayName: 'Account 1',
|
||||||
|
userId: 'user@email.com'
|
||||||
},
|
},
|
||||||
properties: [],
|
properties: [],
|
||||||
isStale: false
|
isStale: false
|
||||||
@@ -42,7 +43,8 @@ suite('Account picker view model tests', () => {
|
|||||||
displayInfo: {
|
displayInfo: {
|
||||||
contextualDisplayName: 'Work/School Account',
|
contextualDisplayName: 'Work/School Account',
|
||||||
accountType: 'microsoft',
|
accountType: 'microsoft',
|
||||||
displayName: 'Account 2'
|
displayName: 'Account 2',
|
||||||
|
userId: 'user@email.com'
|
||||||
},
|
},
|
||||||
properties: [],
|
properties: [],
|
||||||
isStale: true
|
isStale: true
|
||||||
|
|||||||
@@ -36,7 +36,8 @@ suite('Account Management Dialog ViewModel Tests', () => {
|
|||||||
displayInfo: {
|
displayInfo: {
|
||||||
contextualDisplayName: 'Microsoft Account',
|
contextualDisplayName: 'Microsoft Account',
|
||||||
accountType: 'microsoft',
|
accountType: 'microsoft',
|
||||||
displayName: 'Account 1'
|
displayName: 'Account 1',
|
||||||
|
userId: 'user@email.com'
|
||||||
},
|
},
|
||||||
properties: [],
|
properties: [],
|
||||||
isStale: false
|
isStale: false
|
||||||
@@ -47,7 +48,8 @@ suite('Account Management Dialog ViewModel Tests', () => {
|
|||||||
displayInfo: {
|
displayInfo: {
|
||||||
contextualDisplayName: 'Work/School Account',
|
contextualDisplayName: 'Work/School Account',
|
||||||
accountType: 'work_school',
|
accountType: 'work_school',
|
||||||
displayName: 'Account 2'
|
displayName: 'Account 2',
|
||||||
|
userId: 'user@email.com'
|
||||||
},
|
},
|
||||||
properties: [],
|
properties: [],
|
||||||
isStale: true
|
isStale: true
|
||||||
|
|||||||
@@ -36,7 +36,8 @@ suite('Firewall rule dialog controller tests', () => {
|
|||||||
displayInfo: {
|
displayInfo: {
|
||||||
contextualDisplayName: 'Microsoft Account',
|
contextualDisplayName: 'Microsoft Account',
|
||||||
accountType: 'microsoft',
|
accountType: 'microsoft',
|
||||||
displayName: 'Account 1'
|
displayName: 'Account 1',
|
||||||
|
userId: 'user@email.com'
|
||||||
},
|
},
|
||||||
properties: [],
|
properties: [],
|
||||||
isStale: false
|
isStale: false
|
||||||
|
|||||||
@@ -36,7 +36,9 @@ const account: azdata.Account = {
|
|||||||
displayInfo: {
|
displayInfo: {
|
||||||
displayName: 'Test Account 1',
|
displayName: 'Test Account 1',
|
||||||
accountType: 'test',
|
accountType: 'test',
|
||||||
contextualDisplayName: 'Azure Account'
|
contextualDisplayName: 'Azure Account',
|
||||||
|
userId: 'user@email.com'
|
||||||
|
|
||||||
},
|
},
|
||||||
isStale: false,
|
isStale: false,
|
||||||
properties: {}
|
properties: {}
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ suite('ExtHostAccountManagement', () => {
|
|||||||
properties: {},
|
properties: {},
|
||||||
displayInfo: {
|
displayInfo: {
|
||||||
displayName: 'Test Account',
|
displayName: 'Test Account',
|
||||||
|
userId: 'user@email.com',
|
||||||
contextualDisplayName: 'Test Kind Of Account',
|
contextualDisplayName: 'Test Kind Of Account',
|
||||||
accountType: 'test'
|
accountType: 'test'
|
||||||
},
|
},
|
||||||
@@ -272,7 +273,8 @@ suite('ExtHostAccountManagement', () => {
|
|||||||
displayInfo: {
|
displayInfo: {
|
||||||
contextualDisplayName: 'Microsoft Account',
|
contextualDisplayName: 'Microsoft Account',
|
||||||
accountType: 'microsoft',
|
accountType: 'microsoft',
|
||||||
displayName: 'Azure Account 1'
|
displayName: 'Azure Account 1',
|
||||||
|
userId: 'user@email.com'
|
||||||
},
|
},
|
||||||
properties: [],
|
properties: [],
|
||||||
isStale: false
|
isStale: false
|
||||||
@@ -285,7 +287,8 @@ suite('ExtHostAccountManagement', () => {
|
|||||||
displayInfo: {
|
displayInfo: {
|
||||||
contextualDisplayName: 'Work/School Account',
|
contextualDisplayName: 'Work/School Account',
|
||||||
accountType: 'microsoft',
|
accountType: 'microsoft',
|
||||||
displayName: 'Azure Account 2'
|
displayName: 'Azure Account 2',
|
||||||
|
userId: 'user@email.com'
|
||||||
},
|
},
|
||||||
properties: [],
|
properties: [],
|
||||||
isStale: false
|
isStale: false
|
||||||
@@ -347,7 +350,8 @@ suite('ExtHostAccountManagement', () => {
|
|||||||
displayInfo: {
|
displayInfo: {
|
||||||
contextualDisplayName: 'Microsoft Account',
|
contextualDisplayName: 'Microsoft Account',
|
||||||
accountType: 'microsoft',
|
accountType: 'microsoft',
|
||||||
displayName: 'Azure Account 1'
|
displayName: 'Azure Account 1',
|
||||||
|
userId: 'user@email.com'
|
||||||
},
|
},
|
||||||
properties: [],
|
properties: [],
|
||||||
isStale: false
|
isStale: false
|
||||||
@@ -385,7 +389,8 @@ suite('ExtHostAccountManagement', () => {
|
|||||||
displayInfo: {
|
displayInfo: {
|
||||||
contextualDisplayName: 'Microsoft Account',
|
contextualDisplayName: 'Microsoft Account',
|
||||||
accountType: 'microsoft',
|
accountType: 'microsoft',
|
||||||
displayName: 'Azure Account 1'
|
displayName: 'Azure Account 1',
|
||||||
|
userId: 'user@email.com'
|
||||||
},
|
},
|
||||||
properties: [],
|
properties: [],
|
||||||
isStale: false
|
isStale: false
|
||||||
@@ -409,7 +414,8 @@ suite('ExtHostAccountManagement', () => {
|
|||||||
displayInfo: {
|
displayInfo: {
|
||||||
contextualDisplayName: 'Work/School Account',
|
contextualDisplayName: 'Work/School Account',
|
||||||
accountType: 'microsoft',
|
accountType: 'microsoft',
|
||||||
displayName: 'Azure Account 2'
|
displayName: 'Azure Account 2',
|
||||||
|
userId: 'user@email.com'
|
||||||
},
|
},
|
||||||
properties: [],
|
properties: [],
|
||||||
isStale: false
|
isStale: false
|
||||||
|
|||||||
Reference in New Issue
Block a user