The question is we are defining requires_original_data/2
by default for all modules that use Ash.Policy.SimpleCheck
as seen in the __using__
macro defined in Ash.Policy.SimpleCheck
.
defmacro __using__(_) do
quote generated: true do
@behaviour Ash.Policy.SimpleCheck
@behaviour Ash.Policy.Check
...
**def requires_original_data?(_, _), do: false**
...
defoverridable requires_original_data?: 2,
prefer_expanded_description?: 0,
eager_evaluate?: 0
end
end
Yet for all the builtin Policy Checks that use Ash.Policy.SimpleCheck
, we are defining the same def requires_original_data?(_, _), do: false
directly in the implementing modules as well. For eg., ash/lib/ash/policy/check/actor_absent.ex at main · ash-project/ash · GitHub
So the question is
- Can we remove the redundant
requires_original_data
definition in all checks thatuse Ash.Policy.SimpleCheck
? or is it intentional for any reasons?