diff --git a/acl/acl.go b/acl/acl.go index 13377147e20..bc343bc093f 100644 --- a/acl/acl.go +++ b/acl/acl.go @@ -363,11 +363,7 @@ func (a *ACL) anyNamespaceAllows(cb func(capabilitySet) bool) bool { checkFn := func(_ []byte, iv interface{}) bool { v := iv.(capabilitySet) - allow = cb(v) - if allow { - return true - } - return false + return cb(v) } a.namespaces.Root().Walk(checkFn)