mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2024-11-25 06:56:38 +00:00
Adds disableLocalAuth check for listKeys call (#931)
This commit is contained in:
parent
71113e403e
commit
4614ab3427
@ -9,6 +9,7 @@ export interface DatabaseAccount {
|
||||
|
||||
export interface DatabaseAccountExtendedProperties {
|
||||
documentEndpoint?: string;
|
||||
disableLocalAuth?: boolean;
|
||||
tableEndpoint?: string;
|
||||
gremlinEndpoint?: string;
|
||||
cassandraEndpoint?: string;
|
||||
|
@ -15,7 +15,7 @@ export async function fetchDatabaseAccounts(subscriptionId: string, accessToken:
|
||||
|
||||
let accounts: Array<DatabaseAccount> = [];
|
||||
|
||||
let nextLink = `${configContext.ARM_ENDPOINT}/subscriptions/${subscriptionId}/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2020-06-01-preview`;
|
||||
let nextLink = `${configContext.ARM_ENDPOINT}/subscriptions/${subscriptionId}/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2021-06-15`;
|
||||
|
||||
while (nextLink) {
|
||||
const response: Response = await fetch(nextLink, { headers });
|
||||
|
@ -105,7 +105,9 @@ async function configureHostedWithAAD(config: AAD): Promise<Explorer> {
|
||||
aadToken = aadTokenResponse.accessToken;
|
||||
}
|
||||
try {
|
||||
if (!account.properties.disableLocalAuth) {
|
||||
keys = await listKeys(subscriptionId, resourceGroup, account.name);
|
||||
}
|
||||
} catch (e) {
|
||||
if (userContext.features.enableAadDataPlane) {
|
||||
console.warn(e);
|
||||
|
Loading…
Reference in New Issue
Block a user