mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-02-12 19:25:17 +00:00
* Disable Schema Analyzer if VNET or Firewall is enabled * Add support for private endpoint connections * Fix lint warning
18 lines
589 B
TypeScript
18 lines
589 B
TypeScript
import { userContext } from "../UserContext";
|
|
|
|
function isVirtualNetworkFilterEnabled() {
|
|
return userContext.databaseAccount?.properties?.isVirtualNetworkFilterEnabled;
|
|
}
|
|
|
|
function isIpRulesEnabled() {
|
|
return userContext.databaseAccount?.properties?.ipRules?.length > 0;
|
|
}
|
|
|
|
function isPrivateEndpointConnectionsEnabled() {
|
|
return userContext.databaseAccount?.properties?.privateEndpointConnections?.length > 0;
|
|
}
|
|
|
|
export function isPublicInternetAccessAllowed(): boolean {
|
|
return !isVirtualNetworkFilterEnabled() && !isIpRulesEnabled() && !isPrivateEndpointConnectionsEnabled();
|
|
}
|