added comms net default acl check

This commit is contained in:
0xdcarns 2022-03-17 13:51:23 -04:00
parent 5ba79afeba
commit d738a35eaf

View file

@ -30,7 +30,7 @@ func InitializeCommsNetwork() error {
setCommsID()
_, err := logic.GetNetwork(COMMS_NETID)
commsNetwork, err := logic.GetNetwork(COMMS_NETID)
if err != nil {
var network models.Network
network.NetID = COMMS_NETID
@ -42,6 +42,12 @@ func InitializeCommsNetwork() error {
_, err = logic.CreateNetwork(network)
return err
}
if commsNetwork.DefaultACL == "" {
commsNetwork.DefaultACL = "yes"
if err = logic.SaveNetwork(&commsNetwork); err != nil {
logger.Log(1, "comms net default acl is set incorrectly, please manually adjust to \"yes\",", COMMS_NETID)
}
}
time.Sleep(time.Second << 1)
SyncServerNetwork(COMMS_NETID)