Zach Daniel
f2dfcee9ca
WIP
2024-09-08 09:24:53 -04:00
Zach Daniel
ec12332e95
fix: properly leverage atomic upgrade read action for an update action
2024-09-05 15:04:38 -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
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
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
Zach Liss
f1874a708d
docs: Fix typo in authorize-access-to-resources howto ( #1431 )
2024-09-02 10:58:33 -04:00
Barnabas Jovanovics
0dc3a75aaf
use Ash instead of Domain module for read in docs ( #1430 )
2024-09-02 10:58:04 -04:00
Zach Daniel
b99ff3b3a0
chore: update docs
2024-08-30 18:27:48 -04:00
Zach Daniel
f4dc9620ae
improvement: make default page type configurable, defaulting to :offset
...
The getting started guide and ash installer set it to `:keyset`
closes #1413
2024-08-30 17:18:50 -04:00
Andreas Donig
bc400929fb
docs: Make sure there is a caret in front of each atomic_ref occurence ( #1403 )
2024-08-22 14:27:47 -04:00
Zach Daniel
b841eaf54c
chore: add tests for accept & some opts improvements
2024-08-21 11:58:11 -04:00
Zach Daniel
5fc5d32508
improvement: cache action known inputs individually
...
improvement: cache action required inputs all together
2024-08-19 21:49:34 -04:00
Rebecca Le
4b42ef2e41
docs: Replace incorrect attribute
policy check in Policies guide with an expr
( #1393 )
...
There is no built-in check for `attribute` - but the same logic can be expressed readably with a call to `expr`.
2024-08-17 11:00:42 -04:00
Rebecca Le
707de0d664
docs: Fix code typo in Policies guide ( #1392 )
2024-08-16 08:15:33 -04:00
Zach Daniel
87d8263abb
improvement: support expr
and expr_type
options when building aggregates
...
for example:
```elixir
calculate(
:max_comment_similarity,
:float,
expr(max(comments, expr_type: :float, expr: fragment("similarity(?, ?)", title, ^arg(:to))))
) do
argument(:to, :string, allow_nil?: false)
end
```
2024-08-14 20:11:58 -04:00
Alex Slade
61387e6ba0
docs: using multitenancy with code interfaces ( #1388 )
...
---------
Co-authored-by: Zach Daniel <zachary.s.daniel@gmail.com>
2024-08-14 18:42:56 -04:00
Jonatan Männchen
93775109c7
improvement: Implement condition for upsert ( #1386 )
...
Resolves #1385
2024-08-13 19:19:13 -04:00
Zach Daniel
f0c6e86d45
chore: remove unnecessary line in docs
2024-08-12 16:01:58 -04:00
Zach Daniel
dc73c3a3d5
feat: add policy groups
...
Policy groups allow you to group policies by shared conditions.
This can help simplify the mental overhead of large sets of policies.
For example:
```elixir
policies do
policy_group actor_attribute_equals(:role, :owner) do
policy action_type(:read) do
authorize_if expr(owner_id == ^actor(:id))
end
policy action_type([:create, :update, :destroy]) do
forbid_if
authorize_if expr(owner_id == ^actor(:id))
end
end
end
```
2024-08-09 16:48:54 -04:00
Jinkyou Son
b9a094dddd
docs: Fix typo ( #1381 )
2024-08-08 20:15:43 -04:00
Zach Daniel
e4dcd1c397
improvement: implement Comp
for atoms & strings, comparing atoms as strings
2024-08-08 11:38:16 -04:00
Zach Daniel
a719c791ba
improvement: add optimized path for casting embeds when they are simple
...
improvement: add `include_embedded_source_by_default?` config to optimize embeds
improvement: support `:fields` constraint on `:struct` type, enabling persistence
2024-08-07 16:47:01 -04:00
Zach Daniel
17feea7a14
chore: update docs on atomics
2024-08-04 08:56:36 -04:00
Torkild Gundersen Kjevik
77d12dc689
docs: Add section regarding strict-loading for manual relationships. ( #1359 )
...
* Add section about strict-loading for manual relationships.
* Remove comment.
2024-07-31 09:03:10 -04:00
Rebecca Le
912fcf99de
docs: Format default options for special attributes as code, in Ash.Resource DSL ( #1336 )
2024-07-24 06:15:31 -04:00
Zach Daniel
0301009073
docs: add code interface to generic actions guide
2024-07-23 17:42:32 -04:00
Jonatan Männchen
9e155e55c2
docs: document how to call a Generic Action ( #1334 )
2024-07-23 17:40:53 -04:00
Zach Daniel
2d6a3cc35d
chore: set action before determining opts on changeset
2024-07-23 13:15:09 -04:00
Zach Daniel
32c8da1f8d
improvement: add :* as a valid value in skip_unknown_inputs
...
improvement: add `skip_unknown_inputs` to individual actions
improvement: add `skip_unknown_inputs` constraint to embedded resources
2024-07-23 12:51:11 -04:00
Zach Daniel
bad62c1e8a
improvement: add authorize_with
fallback option to bulk actions
...
improvement: store non-expr atomic changes in attributes for simplicity
fix: make `relating_to_actor` built-in-check aware of atomics
closes #1327
2024-07-22 10:03:14 -04:00
Zach Daniel
3c2f51224a
chore: get build passing
2024-07-19 12:40:09 -04:00
Jesse Williams
1ad425bd84
docs: update relationships docs so source_attribute is not required to be unique ( #1320 )
2024-07-18 16:38:43 -04:00
Zach Daniel
dd5bf4a0c0
improvement: update spark for docs fixes, hide aggregate kind
2024-07-17 08:04:17 -04:00
Rebecca Le
a49d99b67f
docs: Set default value for include_nil?
aggregate option ( #1315 )
...
* docs: Note that the `kind` option is pre-set for aggregates when using the DSL
2024-07-17 07:45:01 -04:00
Zach Daniel
5215c4e124
chore: fix build
2024-07-15 08:18:01 -04:00
Tore Pettersen
37755a870b
feat: Allow field policies to hide private fields ( #1289 )
...
* Allow field policies to hide private fields
* Create option for how to handle private fields
* Improve docs
2024-07-15 08:16:52 -04:00
Zach Daniel
ec367e8941
chore: update docs to show installers
2024-07-09 21:11:41 -04:00
Zach Daniel
60da2eed21
docs: capitalize a letter
2024-07-09 19:27:36 -04:00
Zach Daniel
b801203069
docs: add info on using the --with
option in installers
2024-07-09 17:09:12 -04:00
Zach Daniel
d04e846f2c
docs: update getting started guide
2024-07-09 07:03:28 -04:00
Zach Daniel
6048900e74
chore: use tabs for installer
2024-07-08 19:34:11 -04:00
Zach Daniel
4bba656f09
docs: add ash_postgres
in igniter install
2024-07-08 19:30:30 -04:00
Zach Daniel
28eeca1510
docs: use info admonition for tutorial
2024-07-08 18:42:29 -04:00
Zach Daniel
0129285340
improvement: update getting started guide and document generators
2024-07-08 17:15:52 -04:00
Barnabas Jovanovics
51e003e4f2
docs: fix call to for_read in auth docs ( #1291 )
2024-07-08 09:51:56 -04:00
Mikael Muszynski
f7f0db1ef5
docs: extend documentation for validate
where
option ( #1279 )
...
For the `where` option of the `validate` function in the `Ash.Resource`
DSL, the current documentation puts little emphasis on the fact that one
can pass a list of validations to construct complex conditionals.
1. Change the text to put more emphasis on the functionality of multiple
`where`-validations.
2. Add more usage examples.
2024-07-03 20:58:57 -04:00
Matheus Cardoso
86c382d642
docs: Fix typos in Relationships & Multitenancy docs ( #1259 )
2024-06-25 09:22:33 -04:00
Zach Daniel
d72b59253a
docs: update docs on batch callbacks
2024-06-24 08:25:30 -04:00