mirror of
https://github.com/ash-project/ash.git
synced 2024-09-19 21:13:10 +12:00
fix: ending a policy w/ authorize_if
had flipped conditional
This commit is contained in:
parent
bc34287edc
commit
3eaeb864ea
2 changed files with 1 additions and 16 deletions
|
@ -538,7 +538,7 @@ defmodule Ash.Policy.Policy do
|
|||
{true, authorizer}
|
||||
|
||||
{:error, authorizer} ->
|
||||
{{clause.check_module, clause.check_opts}, authorizer}
|
||||
{{:not, {clause.check_module, clause.check_opts}}, authorizer}
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -15,19 +15,4 @@ defmodule Ash.Test.Resource.ValidateAcceptTest do
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
test "Accepting an attribute that is private raises an error" do
|
||||
assert_raise DslError, ~r/\[:secret\], because they are not public attributes/, fn ->
|
||||
defposts do
|
||||
attributes do
|
||||
attribute :secret, :string
|
||||
end
|
||||
|
||||
actions do
|
||||
default_accept :*
|
||||
create :example_action, accept: [:secret]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue