Current section

192 Versions

Jump to

Compare versions

8 files changed
+33 additions
-22 deletions
  @@ -5,6 +5,25 @@ See [Conventional Commits](Https://conventionalcommits.org) for commit guideline
5 5
6 6 <!-- changelog -->
7 7
8 + ## [v2.0.0-rc.8](https://github.com/ash-project/ash_phoenix/compare/v2.0.0-rc.7...v2.0.0-rc.8) (2024-04-30)
9 +
10 +
11 +
12 +
13 + ### Bug Fixes:
14 +
15 + * don't use `public_attributes?`, check for all accepted attributes
16 +
17 + * show proper error message for accepted/non accepted missing forms
18 +
19 + * Pass the tenant to `Ash.can/3` and `Ash.can?/3`. (#165)
20 +
21 + * Pass the tenant to `Ash.can/3` and `Ash.can?/3`.
22 +
23 + ### Improvements:
24 +
25 + * Remove domain opt from AshPhoenix.LiveView (#167)
26 +
8 27 ## [v2.0.0-rc.7](https://github.com/ash-project/ash_phoenix/compare/v2.0.0-rc.6...v2.0.0-rc.7) (2024-04-23)
9 28 ### Breaking Changes:
  @@ -2,7 +2,7 @@
2 2
3 3 The AshPhoenix plugin adds lots of helpers for working with Phoenix Liveview (and regular views).
4 4
5 - `{:ash_phoenix, "~> 2.0.0-rc.7"}`
5 + `{:ash_phoenix, "~> 2.0.0-rc.8"}`
6 6
7 7 Check out the [getting started with phoenix guide](/documentation/tutorials/getting-started-with-ash-and-phoenix.md) for setup.
  @@ -1,7 +1,7 @@
1 1 {<<"links">>,
2 2 [{<<"GitHub">>,<<"https://github.com/ash-project/ash_phoenix">>}]}.
3 3 {<<"name">>,<<"ash_phoenix">>}.
4 - {<<"version">>,<<"2.0.0-rc.7">>}.
4 + {<<"version">>,<<"2.0.0-rc.8">>}.
5 5 {<<"description">>,<<"Utilities for integrating Ash with Phoenix">>}.
6 6 {<<"elixir">>,<<"~> 1.11">>}.
7 7 {<<"app">>,<<"ash_phoenix">>}.
  @@ -850,7 +850,7 @@ defmodule AshPhoenix.Form.Auto do
850 850 @doc false
851 851 def accepted_attributes(resource, action) do
852 852 resource
853 - |> Ash.Resource.Info.public_attributes()
853 + |> Ash.Resource.Info.attributes()
854 854 |> only_accepted(action)
855 855 end
  @@ -619,7 +619,7 @@ defmodule AshPhoenix.Form do
619 619 end
620 620
621 621 def can_submit?(form) do
622 - Ash.can?(form.source, form.source.context[:private][:actor])
622 + Ash.can?(form.source, form.source.context[:private][:actor], tenant: form.source.tenant)
623 623 end
624 624
625 625 @spec ensure_can_submit!(t()) :: t()
  @@ -630,7 +630,8 @@ defmodule AshPhoenix.Form do
630 630
631 631 def ensure_can_submit!(form) do
632 632 case Ash.can(form.source, form.source.context[:private][:actor],
633 - return_forbidden_error?: true
633 + return_forbidden_error?: true,
634 + tenant: form.source.tenant
634 635 ) do
635 636 {:ok, false, %{stacktrace: %{stacktrace: stacktrace}} = exception} ->
636 637 reraise exception, stacktrace
Loading more files…