improvement: honor authorize?: false option in generic actions

This commit is contained in:
Zach Daniel 2023-10-27 15:28:51 -04:00
parent 291dea3de9
commit 780eae8d69
2 changed files with 5 additions and 0 deletions

View file

@ -160,6 +160,10 @@ defmodule Ash.Actions.Action do
""" """
end end
defp authorize(_api, _actor, %{context: %{private: %{authorize?: false}}}) do
:ok
end
defp authorize(api, actor, input) do defp authorize(api, actor, input) do
input.resource input.resource
|> Ash.Resource.Info.authorizers() |> Ash.Resource.Info.authorizers()

View file

@ -1736,6 +1736,7 @@ defmodule Ash.Actions.Read do
{name, dep_query} = List.last(dep_path) {name, dep_query} = List.last(dep_path)
path ++ path ++
:lists.droplast(dep_path) ++
[:calc_dep] ++ [:calc_dep] ++
[ [
%{ %{