Listing items in a namespace should always include the namespace in the URL

This commit is contained in:
derekwaynecarr
2015-03-30 15:11:35 -04:00
parent 3e0cdff97c
commit 265a0e3ca4
2 changed files with 55 additions and 3 deletions

View File

@@ -537,9 +537,7 @@ func (n scopeNaming) GenerateLink(req *restful.Request, obj runtime.Object) (pat
}
}
path = strings.Replace(n.itemPath, "{name}", name, 1)
if !n.allNamespaces {
path = strings.Replace(path, "{"+n.scope.ParamName()+"}", namespace, 1)
}
path = strings.Replace(path, "{"+n.scope.ParamName()+"}", namespace, 1)
return path, "", nil
}