Allow non-admin BDC connections to see BDC features (#12663) (#12737)

* Add handling for non-admin BDC users

* Bump STS

* Fix HDFS root node commands

* remove nested awaits

* colon
This commit is contained in:
Charles Gagnon
2020-10-05 15:55:23 -07:00
committed by GitHub
parent 93156ccf04
commit 72d48bda61
16 changed files with 229 additions and 150 deletions

View File

@@ -5,6 +5,7 @@
import * as azdata from 'azdata';
import * as vscode from 'vscode';
import * as bdc from 'bdc';
import * as path from 'path';
import * as crypto from 'crypto';
import * as os from 'os';
@@ -222,15 +223,15 @@ export function getUserHome(): string {
return process.env.HOME || process.env.USERPROFILE;
}
export function getClusterEndpoints(serverInfo: azdata.ServerInfo): IEndpoint[] | undefined {
export function getClusterEndpoints(serverInfo: azdata.ServerInfo): bdc.IEndpointModel[] | undefined {
let endpoints: RawEndpoint[] = serverInfo.options[constants.clusterEndpointsProperty];
if (!endpoints || endpoints.length === 0) { return []; }
return endpoints.map(e => {
// If endpoint is missing, we're on CTP bits. All endpoints from the CTP serverInfo should be treated as HTTPS
let endpoint = e.endpoint ? e.endpoint : `https://${e.ipAddress}:${e.port}`;
let updatedEndpoint: IEndpoint = {
serviceName: e.serviceName,
let updatedEndpoint: bdc.IEndpointModel = {
name: e.serviceName,
description: e.description,
endpoint: endpoint,
protocol: e.protocol
@@ -266,13 +267,6 @@ interface RawEndpoint {
port?: number;
}
export interface IEndpoint {
serviceName: string;
description: string;
endpoint: string;
protocol: string;
}
export function isValidNumber(maybeNumber: any) {
return maybeNumber !== undefined
&& maybeNumber !== null