Skip to main content

check_net_permission

Function check_net_permission 

Source
pub fn check_net_permission(
    ctx: &ModuleContext<'_>,
    permission: Permission,
    address: &str,
) -> Result<(), String>
Expand description

Check permission and enforce network host scope constraints.

After verifying the base permission (NetConnect, NetListen, or NetScoped), checks ScopeConstraints::allowed_hosts when present. If the scope constraints list hosts, the target address must match at least one (supports host:port and *.domain.com wildcards).