diff options
| author | mo khan <mo@mokhan.ca> | 2025-07-09 17:17:14 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-07-09 17:17:14 -0600 |
| commit | 9c62299e87a89b48e829eca0491076a82d61263e (patch) | |
| tree | bd959e1925e91bb800150002a36d83e2695fc535 /src/authorization | |
| parent | 2bfefb123605f48f3b21fea260d5f680402dc410 (diff) | |
fix: use PolicySet#merge to merge policies from multiple files
Diffstat (limited to 'src/authorization')
| -rw-r--r-- | src/authorization/cedar_authorizer.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/authorization/cedar_authorizer.rs b/src/authorization/cedar_authorizer.rs index 51061648..230c10a8 100644 --- a/src/authorization/cedar_authorizer.rs +++ b/src/authorization/cedar_authorizer.rs @@ -50,10 +50,7 @@ impl CedarAuthorizer { if extension == "cedar" { let content = fs::read_to_string(&file_path)?; let file_policies = cedar_policy::PolicySet::from_str(&content)?; - - for policy in file_policies.policies() { - policies.add(policy.clone())?; - } + policies.merge(&file_policies, true)?; } } } |
