Only show networking settings warning for Mongo and Cassandra accounts (#1376)

This commit is contained in:
victor-meng 2023-01-18 11:12:10 -08:00 committed by GitHub
parent ab1409efb1
commit 5059917edf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 27 additions and 23 deletions

View File

@ -11,6 +11,7 @@ const PortalIPs: { [key: string]: string[] } = {
};
export const doNetworkSettingsAllowDataExplorerAccess = (): boolean => {
if (userContext.apiType === "Cassandra" || userContext.apiType === "Mongo") {
const accountProperties = userContext.databaseAccount?.properties;
if (!accountProperties) {
@ -37,4 +38,7 @@ export const doNetworkSettingsAllowDataExplorerAccess = (): boolean => {
});
return numberOfMatches === portalIPs.length;
}
return true;
};