From 9c62299e87a89b48e829eca0491076a82d61263e Mon Sep 17 00:00:00 2001 From: mo khan Date: Wed, 9 Jul 2025 17:17:14 -0600 Subject: fix: use PolicySet#merge to merge policies from multiple files --- src/authorization/cedar_authorizer.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/authorization/cedar_authorizer.rs') 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)?; } } } -- cgit v1.2.3