소스 검색

revert acl check on extclient

abhishek9686 9 달 전
부모
커밋
07f0181ebe
1개의 변경된 파일9개의 추가작업 그리고 9개의 파일을 삭제
  1. 9 9
      logic/extpeers.go

+ 9 - 9
logic/extpeers.go

@@ -737,15 +737,15 @@ func GetExtPeers(node, peer *models.Node) ([]wgtypes.PeerConfig, []models.IDandA
 		if !IsClientNodeAllowed(&extPeer, peer.ID.String()) {
 			continue
 		}
-		// if extPeer.RemoteAccessClientID == "" {
-		// 	if ok, _ := IsNodeAllowedToCommunicate(extPeer.ConvertToStaticNode(), *peer); !ok {
-		// 		continue
-		// 	}
-		// } else {
-		// 	if ok, _ := IsUserAllowedToCommunicate(extPeer.OwnerID, *peer); !ok {
-		// 		continue
-		// 	}
-		// }
+		if extPeer.RemoteAccessClientID == "" {
+			if ok, _ := IsNodeAllowedToCommunicate(extPeer.ConvertToStaticNode(), *peer); !ok {
+				continue
+			}
+		} else {
+			if ok, _ := IsUserAllowedToCommunicate(extPeer.OwnerID, *peer); !ok {
+				continue
+			}
+		}
 
 		pubkey, err := wgtypes.ParseKey(extPeer.PublicKey)
 		if err != nil {