mirror of
https://github.com/rancher/norman.git
synced 2025-09-19 01:17:04 +00:00
Enable filter namespaces on server side
This commit is contained in:
@@ -283,10 +283,11 @@ func getNamespace(apiContext *types.APIContext, opt *types.QueryOptions) string
|
|||||||
}
|
}
|
||||||
|
|
||||||
for _, condition := range opt.Conditions {
|
for _, condition := range opt.Conditions {
|
||||||
if condition.Field == "namespaceId" && condition.Value != "" {
|
mod := condition.ToCondition().Modifier
|
||||||
|
if condition.Field == "namespaceId" && condition.Value != "" && mod != types.ModifierIn && mod != types.ModifierNotIn {
|
||||||
return condition.Value
|
return condition.Value
|
||||||
}
|
}
|
||||||
if condition.Field == "namespace" && condition.Value != "" {
|
if condition.Field == "namespace" && condition.Value != "" && mod != types.ModifierIn && mod != types.ModifierNotIn {
|
||||||
return condition.Value
|
return condition.Value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user