feat: kubesphere 4.0 (#6115)
* feat: kubesphere 4.0 Signed-off-by: ci-bot <ci-bot@kubesphere.io> * feat: kubesphere 4.0 Signed-off-by: ci-bot <ci-bot@kubesphere.io> --------- Signed-off-by: ci-bot <ci-bot@kubesphere.io> Co-authored-by: ks-ci-bot <ks-ci-bot@example.com> Co-authored-by: joyceliu <joyceliu@yunify.com>
This commit is contained in:
committed by
GitHub
parent
b5015ec7b9
commit
447a51f08b
11
vendor/github.com/open-policy-agent/opa/topdown/object.go
generated
vendored
11
vendor/github.com/open-policy-agent/opa/topdown/object.go
generated
vendored
@@ -200,7 +200,16 @@ func mergewithOverwriteInPlace(obj, other ast.Object, frozenKeys map[*ast.Term]s
|
||||
v2 := obj.Get(k)
|
||||
// The key didn't exist in other, keep the original value.
|
||||
if v2 == nil {
|
||||
obj.Insert(k, v)
|
||||
nestedObj, ok := v.Value.(ast.Object)
|
||||
if !ok {
|
||||
// v is not an object
|
||||
obj.Insert(k, v)
|
||||
} else {
|
||||
// Copy the nested object so the original object would not be modified
|
||||
nestedObjCopy := nestedObj.Copy()
|
||||
obj.Insert(k, ast.NewTerm(nestedObjCopy))
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
// The key exists in both. Merge or reject change.
|
||||
|
||||
Reference in New Issue
Block a user