浏览代码

bypass acl policy

abhishek9686 4 月之前
父节点
当前提交
35edcd01de
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      logic/acls.go

+ 3 - 0
logic/acls.go

@@ -647,6 +647,9 @@ func IsUserAllowedToCommunicate(userName string, peer models.Node) (bool, []mode
 // IsPeerAllowed - checks if peer needs to be added to the interface
 func IsPeerAllowed(node, peer models.Node, checkDefaultPolicy bool) bool {
 	var nodeId, peerId string
+	if peer.IsFailOver && node.FailedOverBy == peer.ID {
+		return true
+	}
 	if node.IsStatic {
 		nodeId = node.StaticNode.ClientID
 		node = node.StaticNode.ConvertToStaticNode()