Parcourir la source

revert acl check on extclient

abhishek9686 il y a 9 mois
Parent
commit
07f0181ebe
1 fichiers modifiés avec 9 ajouts et 9 suppressions
  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 {