Skip to content

Commit

Permalink
fix: ensure that policy group rules are enforced
Browse files Browse the repository at this point in the history
  • Loading branch information
zachdaniel committed Sep 20, 2024
1 parent 0319799 commit a3ca14f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/ash/policy/authorizer/authorizer.ex
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ defmodule Ash.Policy.Authorizer do
@policy_group %Spark.Dsl.Entity{
name: :policy_group,
target: Ash.Policy.PolicyGroup,
transform: {Ash.Policy.PolicyGroup, :transform, []},
describe: """
Groups a set of policies together by some condition.
Expand Down
2 changes: 1 addition & 1 deletion lib/ash/policy/policy_group.ex
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ defmodule Ash.Policy.PolicyGroup do
{:error, "Policy groups must contain at least one policy."}
else
if Enum.any?(group.policies, fn
%Ash.Policy.Policy{bypass?: bypass?} ->
%{bypass?: bypass?} ->
bypass?

_ ->
Expand Down

0 comments on commit a3ca14f

Please sign in to comment.