ash/test/support/policy_rbac/resources/user.ex
2022-08-28 19:27:44 -06:00

26 lines
529 B
Elixir

defmodule Ash.Test.Support.PolicyRbac.User do
@moduledoc false
use Ash.Resource,
data_layer: Ash.DataLayer.Ets,
authorizers: [
Ash.Policy.Authorizer
]
ets do
private?(true)
end
attributes do
uuid_primary_key(:id)
end
actions do
defaults [:create, :read, :update, :destroy]
end
relationships do
has_many(:memberships, Ash.Test.Support.PolicyRbac.Membership, destination_attribute: :user_id)
belongs_to(:organization, Ash.Test.Support.PolicyRbac.Organization)
end
end