use default partition constant

pull/21230/head
Michael Zalimeni 2024-05-28 17:27:22 -04:00
parent 329bdc1345
commit 0f5d0adebd
1 changed files with 2 additions and 1 deletions

View File

@ -7,6 +7,7 @@ package discovery
import (
"github.com/hashicorp/consul/acl"
"github.com/hashicorp/consul/api"
)
func (f *V1DataFetcher) NormalizeRequest(req *QueryPayload) {
@ -15,7 +16,7 @@ func (f *V1DataFetcher) NormalizeRequest(req *QueryPayload) {
}
func validateEnterpriseTenancy(req QueryTenancy) error {
if !(req.Namespace == "" || req.Namespace == acl.DefaultNamespaceName) || !(req.Partition == acl.DefaultPartitionName || req.Partition == "default") {
if !(req.Namespace == "" || req.Namespace == acl.DefaultNamespaceName) || !(req.Partition == "" || req.Partition == api.PartitionDefaultName) {
return ErrNotSupported
}
return nil