fix: fallback to authorize_with when authorizing bulk destroy actions

This commit is contained in:
Zach Daniel 2024-07-22 14:04:32 -04:00
parent c2ac47e21e
commit dcb69882df

View file

@ -1145,7 +1145,7 @@ defmodule Ash.Actions.Destroy.Bulk do
on_must_pass_strict_check:
{:error, %Ash.Error.Forbidden.InitialDataRequired{source: changeset}},
run_queries?: false,
filter_with: opts[:authorize_changeset_with] || :filter,
filter_with: opts[:authorize_changeset_with] || opts[:authorize_with] || :filter,
alter_source?: true,
base_query: query
) do