support static nodes in standalone device policies

This commit is contained in:
abhishek9686 2025-02-03 16:02:42 +04:00
parent 9a40717b5b
commit 46d79ee512

View file

@ -280,9 +280,12 @@ func IsAclPolicyValid(acl models.Acl) bool {
return false
}
} else {
_, err := GetNodeByID(dstI.Value)
if err != nil {
return false
_, nodeErr := GetNodeByID(dstI.Value)
if nodeErr != nil {
_, staticNodeErr := GetExtClient(dstI.Value, acl.NetworkID.String())
if staticNodeErr != nil {
return false
}
}
}
}
@ -329,9 +332,12 @@ func IsAclPolicyValid(acl models.Acl) bool {
return false
}
} else {
_, err := GetNodeByID(dstI.Value)
if err != nil {
return false
_, nodeErr := GetNodeByID(dstI.Value)
if nodeErr != nil {
_, staticNodeErr := GetExtClient(dstI.Value, acl.NetworkID.String())
if staticNodeErr != nil {
return false
}
}
}
}