mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-30 03:41:51 +08:00
NET-1932: handle non-inet egress ranges on inet gw (#3479)
* move relevant acl and tag code to CE and Pro pkgs * intialise pro acl funcs * list gateways by user access * check user gw access by policies * filter out user policies on CE * filter out tagged policies on CE * fix ce acl comms * allow gateways tag * allow gateway tag on CE, remove failover and gw check on acl policy * add gw rules func to pro * add inet gw support on CE * add egress acl API * add egress acl API * fix(go): set is_gw when converting api node to server node; * fix(go): set is_gw when converting api node to server node; * fix policy validity checker for inet gws * move dns option to host model * fix node removal from egress policy on delete * add migration logic for ManageDNS * fix dns json field * fix nil error on node tags * add egress info to relayed nodes * fix default network user policy * fix egress migration * fix egress migration * add failover inet gw check * optiomise egress calls * auto create gw on inet egress node * optimise egress calls * add global user role check * fix egress on inet gw --------- Co-authored-by: Vishal Dalwadi <dalwadivishal26@gmail.com>
This commit is contained in:
@@ -50,8 +50,11 @@ func userMiddleWare(handler http.Handler) http.Handler {
|
||||
if strings.Contains(route, "createrelay") || strings.Contains(route, "deleterelay") {
|
||||
r.Header.Set("TARGET_RSRC", models.RelayRsrc.String())
|
||||
}
|
||||
|
||||
if strings.Contains(route, "gateway") {
|
||||
r.Header.Set("TARGET_RSRC", models.GatewayRsrc.String())
|
||||
}
|
||||
|
||||
if strings.Contains(route, "egress") {
|
||||
r.Header.Set("TARGET_RSRC", models.EgressGwRsrc.String())
|
||||
}
|
||||
if strings.Contains(route, "networks") {
|
||||
|
||||
Reference in New Issue
Block a user