mirror of
https://github.com/rancher/norman.git
synced 2025-09-18 16:35:19 +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 {
|
||||
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
|
||||
}
|
||||
if condition.Field == "namespace" && condition.Value != "" {
|
||||
if condition.Field == "namespace" && condition.Value != "" && mod != types.ModifierIn && mod != types.ModifierNotIn {
|
||||
return condition.Value
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user