Zach Daniel
8ae2a1cd90
improvement: update igniter and fix deprecation warnings
2024-09-13 18:55:24 -04:00
Zach Daniel
42a5ee4d80
fix: properly add all types of extensions in mix ash.patch.extend
2024-09-13 18:43:56 -04:00
sinisijacob
241e7b6aa9
chore: Moved common block editing code into single function ( #1460 )
...
* adding a generic block editor and repointing some of the similar functions to it
2024-09-13 18:13:14 -04:00
Zach Daniel
832070a69a
chore: format
2024-09-13 14:45:00 -04:00
Zach Daniel
c171bfae5e
improvement: small improvements for policy breakdown formatting
2024-09-13 09:38:01 -04:00
Zach Daniel
45b037e2ba
fix: ensure that field policies don't interfere with relationship loading
...
closes #1457
2024-09-12 11:12:37 -04:00
Zach Daniel
95ac815948
chore: format
2024-09-12 10:00:08 -04:00
Zach Daniel
5cf0f6b7d1
fix: properly merge provided context in atomic bulk actions
2024-09-12 09:58:56 -04:00
Zach Daniel
27012af42f
fix: properly handle rollbacks from DBConnection
failures for belongs to relationships
...
closes #1456
2024-09-12 09:28:20 -04:00
Zach Daniel
6a0e92a697
chore: fix added validation builder in Ash.Resource
2024-09-11 20:19:06 -04:00
Zach Daniel
bbc59b4b7f
fix: don't generate doubly nested policies when adding policies in igniter
2024-09-11 19:59:58 -04:00
m0rt3nlund
892598e439
test: Failing tests for creating Ash.Resource.Action validation using DSL builder ( #1454 )
...
* Add build_action_validation to Ash.Resource.Builder
* Add test for Ash.Resource.Builder
---------
Co-authored-by: morten.lund@maskon.no <morten.lund@maskon.no>
2024-09-11 16:32:18 -04:00
Jonatan Männchen
85520d3974
Fix: fix Ash.Changeset.manage_relationships/4 for list primary keys ( #1455 )
2024-09-11 16:21:32 -04:00
Jonatan Männchen
0ea5ce64b6
fix: Handle Ash.Query.filter for array values ( #1452 )
...
* Refactor Ash.Filter.parse_predicates/3
* Handle Ash.Query.filter for array values
2024-09-11 15:28:08 -04:00
andreas-ementio
672f16c527
fix: cast embedded time properly ( #1451 )
...
just like the commit d4a6feb58
for datetime but for time
plus reordering the functions so its the same order as in
naive_datetime.ex and date.ex
2024-09-11 15:26:23 -04:00
Zach Daniel
2e2ab0e778
fix: require private/non-accepted attributes after before action hooks
2024-09-11 10:24:48 -04:00
Zach Daniel
cb3facb519
fix: we cannot assume that after_action/1
can be done atomically
...
The reason for this is that a given change may access `changeset.data`
which will not be available. This may introduce compile errors for some users
unfortunately, there is nothing we can do about this. They will need to change
to writing custom changes w/ the `atomic/3` callback that adds an after action
hook
improvement: honor a `_union_type` type param when casting unions
2024-09-11 09:57:22 -04:00
Zach Daniel
5b89286854
chore: format
2024-09-10 17:35:49 -04:00
sinisijacob
8035f80383
igniter function to add a relationship to a resource ( #1450 )
2024-09-10 17:27:32 -04:00
Zach Daniel
e29897e1aa
improvement: add system for action_select
, which can limit selects from mutations
2024-09-10 15:08:08 -04:00
Zach Daniel
e33dc23a07
improvement: support select_by_default?
flag on attributes
2024-09-10 13:24:56 -04:00
Zach Daniel
0f31d463d9
docs: update docs to expand PII term
2024-09-09 13:34:37 -04:00
Nduati Kuria
2c197c03df
Use correct extensions in ash.patch.extend.ex
( #1446 )
2024-09-08 15:47:53 -04:00
Zach Daniel
28233f4d97
chore: update subproject policy tests
2024-09-07 08:17:16 -04:00
Zach Daniel
4f31109bd9
fix: support passing a forbidden error to policies per the docs
...
fixes #1443
2024-09-07 07:51:01 -04:00
Zach Daniel
0dde9f0fc1
fix: don't repor the action as the actor for policy breakdowns
...
fixes #1441
2024-09-07 07:36:37 -04:00
Zach Daniel
a97a65f6a6
fix: check changeset.action
before raising a required primary action error
2024-09-06 17:03:57 -04:00
Zach Daniel
44c0d09e30
fix: ensure proper return types for :stream
strategy bulk update/destroys
2024-09-06 15:46:02 -04:00
Zach Daniel
e148dda41e
improvement: add add_bypass
and add_policy
igniter utilities
2024-09-06 15:14:59 -04:00
Zach Daniel
be807aa9e2
fix: don't select destination attributes that don't exist
2024-09-06 09:56:00 -04:00
Zach Daniel
5f5cccc2ea
improvement: show informative error explaining the use of filter checks with create actions
...
improvement: show the actor's primary key in policy breakdowns
improvement: add an expanded description option to checks
improvement: use expanded description to display filled in filter templates in policy breakdowns
2024-09-06 09:46:27 -04:00
Rebecca Le
b13181730b
docs: Fix examples for builtin before_action
and after_action
preparations ( #1439 )
2024-09-06 00:24:02 -04:00
295778bbf5
improvement: Add Changeset.is_valid/1
guard. ( #1437 )
2024-09-06 12:57:36 +12:00
Zach Daniel
b6e1e80fc2
fix: properly pass actor when running filters at runtime
...
fix: misplaced curly bracket when handling struct type casting
2024-09-05 16:40:39 -04:00
Zach Daniel
ec12332e95
fix: properly leverage atomic upgrade read action for an update action
2024-09-05 15:04:38 -04:00
Zach Daniel
e8405b43b7
chore: fix in one more place
2024-09-05 00:45:01 -04:00
Zach Daniel
3ce48fb71f
fix: fix type definition for atomic_upgrade_with
2024-09-05 00:40:10 -04:00
Zach Daniel
90332d01f2
fix: use consistent naming for configurations
...
closes #1436
2024-09-04 22:41:05 -04:00
e6a7006c30
feat(Ash.Reactor): Add load
option to existing actions, and add new step type. ( #1435 )
2024-09-05 13:59:22 +12:00
Zach Daniel
24cc008410
improvement: ArgumentError for non-existent actions in Ash.can?
2024-09-04 20:51:54 -04:00
Zach Daniel
d6a973cef0
improvement: better error messages on incorrect action types
2024-09-04 20:41:56 -04:00
Zach Daniel
d144be692e
fix: properly await tasks from lazy loading multiple relationships
2024-09-04 10:32:34 -04:00
Zach Daniel
a2cfaa5fe0
chore: use a better config name
2024-09-03 22:24:24 -04:00
Zach Daniel
06cd509e1f
chore: make the new policy behavior opt-in with config
2024-09-03 22:22:46 -04:00
Zach Daniel
82230f1a89
fix: don't clean calc deps that may need to be reused
2024-09-03 19:00:28 -04:00
Zach Daniel
3c90063c40
fix: fix upsert condition for ets bulk creates
2024-09-03 18:01:43 -04:00
Andreas Donig
de0f72b475
Fix: honor bulk upsert condition ( #1432 )
...
* Require Ash.Expr to make sure upsert_conflict/1 is available
* Make sure it correctly tests opts[:upsert_condition] for nilness
* Make sure the base changeset also adheres to the upsert condition
* Revert the changes so we can show the problem with a test case
* Add a test case that shows what the problem is
* Add the upsert_condition filter to the base changeset again
* Change the way the test checks because bulk_create/4 does not return unchanged records
2024-09-03 16:23:12 -04:00
Zach Daniel
abef09148e
fix: honor return_destroyed?
in soft destroy actions
...
fixes #1433
2024-09-02 14:16:25 -04:00
Zach Daniel
1002d8178e
improvement: make read policies more consistent, always preferring to filter over raise
...
docs: document access type
2024-09-02 14:11:09 -04:00
Zach Daniel
6f2a14715d
improvement: show an explanation when no policies apply
2024-09-02 12:48:36 -04:00