Commit b2a2ce0b authored by Clayton Coleman's avatar Clayton Coleman

Legacy scope naming should NEVER set namespace for root

... resources.
parent 964bc8af
......@@ -691,6 +691,9 @@ var _ ScopeNamer = legacyScopeNaming{}
// Namespace returns the namespace from the query or the default.
func (n legacyScopeNaming) Namespace(req *restful.Request) (namespace string, err error) {
if n.scope.Name() == meta.RESTScopeNameRoot {
return api.NamespaceNone, nil
}
values, ok := req.Request.URL.Query()[n.scope.ParamName()]
if !ok || len(values) == 0 {
// legacy behavior
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment