mirror of
https://github.com/ash-project/ash.git
synced 2024-09-20 21:43:02 +12:00
20 lines
538 B
Elixir
20 lines
538 B
Elixir
|
defmodule Ash.Test.Support.PolicyComplex.Domain do
|
||
|
@moduledoc false
|
||
|
use Ash.Domain,
|
||
|
extensions: [Ash.Policy.Authorizer]
|
||
|
|
||
|
resources do
|
||
|
resource(Ash.Test.Support.PolicyComplex.User)
|
||
|
resource(Ash.Test.Support.PolicyComplex.FriendLink)
|
||
|
resource(Ash.Test.Support.PolicyComplex.Post)
|
||
|
resource(Ash.Test.Support.PolicyComplex.Comment)
|
||
|
resource(Ash.Test.Support.PolicyComplex.Bio)
|
||
|
end
|
||
|
|
||
|
policies do
|
||
|
policy always() do
|
||
|
authorize_unless actor_attribute_equals(:forbidden_by_domain, true)
|
||
|
end
|
||
|
end
|
||
|
end
|