mirror of
https://github.com/ash-project/ash.git
synced 2024-09-21 05:53:06 +12:00
d593e3cee9
chore: remove unused `checks` field from `%Ash.Policy.Authorizer.Policy{}`
27 lines
863 B
Elixir
27 lines
863 B
Elixir
defmodule Ash.Test.Resource.PoliciesTest do
|
|
@moduledoc false
|
|
use ExUnit.Case, async: true
|
|
|
|
test "records can belong to other resources" do
|
|
assert_raise Spark.Error.DslError,
|
|
~r/Bypass policies that can only ever forbid have no effect/,
|
|
fn ->
|
|
defmodule HasBadBypassPolicy do
|
|
use Ash.Resource,
|
|
domain: Ash.Test.Domain,
|
|
authorizers: [Ash.Policy.Authorizer]
|
|
|
|
attributes do
|
|
uuid_primary_key :id
|
|
end
|
|
|
|
policies do
|
|
bypass always() do
|
|
forbid_if always()
|
|
forbid_unless always()
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|