use EqualPartitions

Signed-off-by: acpana <8968914+acpana@users.noreply.github.com>
This commit is contained in:
acpana 2022-07-27 14:48:30 -07:00
parent 0351ca5136
commit 6033584349
No known key found for this signature in database
GPG Key ID: 21CC0F2B42CEA01D
1 changed files with 1 additions and 1 deletions

View File

@ -408,7 +408,7 @@ func (s *Server) validatePeeringInPartition(remotePeerID, partition string) erro
return fmt.Errorf("cannot read peering by ID: %w", err)
}
if peering != nil && peering.GetPartition() == partition {
if peering != nil && acl.EqualPartitions(peering.GetPartition(), partition) {
return fmt.Errorf("cannot create a peering within the same partition (ENT) or cluster (OSS)")
}