Remove networking warning message for sql, gremlin, and tables api (#1388)

This commit is contained in:
victor-meng
2023-02-06 12:51:04 -08:00
committed by GitHub
parent 850f1dfb97
commit 80dd161a6f
3 changed files with 27 additions and 10 deletions

View File

@@ -10,7 +10,7 @@ const PortalIPs: { [key: string]: string[] } = {
usnat: ["7.28.202.68"],
};
export const getNetworkSettingsWarningMessage = (clientIpAddress: string): string => {
export const getNetworkSettingsWarningMessage = (): string => {
const accountProperties = userContext.databaseAccount?.properties;
if (!accountProperties) {
@@ -40,13 +40,7 @@ export const getNetworkSettingsWarningMessage = (clientIpAddress: string): strin
if (numberOfMatches !== portalIPs.length) {
return "The Network settings for this account are preventing access from Data Explorer. Please allow access from Azure Portal to proceed.";
}
return "";
} else {
if (!clientIpAddress || ipRules.some((ipRule) => ipRule.ipAddressOrRange === clientIpAddress)) {
return "";
}
return "The Network settings for this account are preventing access from Data Explorer. Please add your current IP to the firewall rules to proceed.";
}
return "";
};