summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/authorization/cedar_authorizer.rs5
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)?;
}
}
}