Integrate policy-aware item scopes
This commit is contained in:
@@ -316,13 +316,14 @@ func resolveStrictCollectionPolicies(
|
||||
}
|
||||
|
||||
identityFieldsByPath := make(map[string][]string)
|
||||
collectionPolicies := cloneCollectionPolicyScope(lower)
|
||||
effectiveLower := cloneCollectionPolicyScope(lower)
|
||||
collectionPolicies := cloneCollectionPolicyScope(effectiveLower)
|
||||
var diagnostics []Diagnostic
|
||||
for _, path := range paths {
|
||||
key := path.String()
|
||||
currentDeclarations := declarationsByPath[key]
|
||||
|
||||
lowerEntry, hasLower := lower.collections[key]
|
||||
lowerEntry, hasLower := effectiveLower.collections[key]
|
||||
var lowerPolicy *collectionPolicy
|
||||
if hasLower {
|
||||
copy := cloneCollectionPolicy(lowerEntry.policy)
|
||||
@@ -346,6 +347,10 @@ func resolveStrictCollectionPolicies(
|
||||
lowerPolicy.identityFields = nil
|
||||
lowerPolicy.identityPresent = false
|
||||
lowerPolicy.identityLocation = nil
|
||||
lowerPolicy.recordOrder = nil
|
||||
lowerPolicy.recordPolicies = nil
|
||||
effectiveLower.retireCollectionPoliciesAtOrBelow(path)
|
||||
collectionPolicies.retireCollectionPoliciesAtOrBelow(path)
|
||||
}
|
||||
|
||||
resolution, found := resolveCollectionPolicy(path, currentDeclarations, applicationIdentity, lowerPolicy)
|
||||
|
||||
Reference in New Issue
Block a user