mirror of
https://github.com/ash-project/ash.git
synced 2024-09-20 05:23:03 +12:00
improvement: honor authorize?: false
option in generic actions
This commit is contained in:
parent
291dea3de9
commit
780eae8d69
2 changed files with 5 additions and 0 deletions
|
@ -160,6 +160,10 @@ defmodule Ash.Actions.Action do
|
|||
"""
|
||||
end
|
||||
|
||||
defp authorize(_api, _actor, %{context: %{private: %{authorize?: false}}}) do
|
||||
:ok
|
||||
end
|
||||
|
||||
defp authorize(api, actor, input) do
|
||||
input.resource
|
||||
|> Ash.Resource.Info.authorizers()
|
||||
|
|
|
@ -1736,6 +1736,7 @@ defmodule Ash.Actions.Read do
|
|||
{name, dep_query} = List.last(dep_path)
|
||||
|
||||
path ++
|
||||
:lists.droplast(dep_path) ++
|
||||
[:calc_dep] ++
|
||||
[
|
||||
%{
|
||||
|
|
Loading…
Reference in a new issue