Commit graph

3361 commits

Author SHA1 Message Date
Zach Daniel
550a9c1424 chore: fix file name 2024-01-30 15:23:04 -05:00
Zach Daniel
49ac5a23dd fix: set default access type properly 2024-01-30 13:37:34 -05:00
Zach Daniel
15ab382ee0 chore: remove IO.inspect 2024-01-30 13:17:12 -05:00
Zach Daniel
9f748b5c55 test: update authorizer tests
fix: properly handle the case where all valid scenarios are pruned
2024-01-30 13:11:47 -05:00
Barnabas Jovanovics
406a076ef1
test: add test that shows expr condition does not work with access_type :strict (#858) 2024-01-30 12:53:23 -05:00
Zach Daniel
9e02b0d0c7 improvement: introduce require_atomic?, which defaults to false in 2.0, true in 3.0
fix: properly prevent the atomic handling of manual update actions
improvement: better support around the mixing of atomic and non atomic changes/validations
2024-01-30 12:32:41 -05:00
Zach Daniel
d7721d9b1e chore: docs & formatter 2024-01-29 18:03:56 -05:00
Zach Daniel
8e82d9588f chore: better handling of atomic validations 2024-01-29 17:55:56 -05:00
Zach Daniel
f4339be426 chore: fix stream option taking (again) 2024-01-29 15:56:48 -05:00
Zach Daniel
248f99ebcf fix: fix passing extra opts to stream
fix: properly check if data layer can update_query
2024-01-29 15:43:21 -05:00
Zach Daniel
210d8d03c7 improvement: more atomic implementations
chore: wrap up load/select support in atomic updates
2024-01-29 15:17:52 -05:00
Zach Daniel
c02bced508 improvement: support loading and selecting in bulk operations 2024-01-29 14:29:50 -05:00
Zach Daniel
cf009476b2 chore: better non-atomic message on updates 2024-01-29 11:15:56 -05:00
Zach Daniel
b01168b597 improvement: use atomic create actions where possible 2024-01-29 10:37:10 -05:00
Tun Cham Roeun
c075d18f33
fix: Ash.Type.Float to support min/max constraints(#856) 2024-01-28 09:11:10 -05:00
Zach Daniel
2549c20105 chore: format 2024-01-27 10:33:17 -05:00
Zach Daniel
c9c2408401 fix: add calculations before distinct is applied in data layer query 2024-01-27 10:20:23 -05:00
Zach Daniel
f1952a5d8b chore: format 2024-01-27 09:55:11 -05:00
Zach Daniel
77c01123f0 fix: properly set index on embedded type array errors
fixes #854
2024-01-27 09:55:04 -05:00
Dmitry Maganov
c40f762eee
fix: use correct option for relationship in atomic relate_actor (#855)
---------

Co-authored-by: Zach Daniel <zachary.s.daniel@gmail.com>
2024-01-27 09:53:03 -05:00
Barnabas Jovanovics
fb3e7050a1
fix: only count resources the actor is allowed to see (#853)
* fix: only count resources the actor is allowed to see

* remove specc added by vscode
2024-01-26 13:33:03 -05:00
Zach Daniel
50b186bef9 chore: fix typespec 2024-01-25 14:22:41 -05:00
Zach Daniel
2888fea33b chore: format 2024-01-25 13:55:09 -05:00
Zach Daniel
56a75782e3 chore: update erlang/elixir version 2024-01-25 13:47:37 -05:00
Zach Daniel
b494c76a92 fix: deselect known forbidden fields *after* query authorization is complete 2024-01-25 11:19:52 -05:00
Barnabas Jovanovics
f2994502b9
add test for selecting policy (#852) 2024-01-25 11:08:31 -05:00
Jechol Lee
0d504ec429
test: Remove unnecessary authorize?: false in belongs_to_test (#849) 2024-01-25 10:50:37 -05:00
Zach Daniel
a68a628839 improvement: always define merge_load/4 2024-01-25 10:45:08 -05:00
Dmitry Maganov
c8b1eaa8f0
fix: soft? in destroy action options is a boolean, not an atom (#851) 2024-01-24 14:52:31 -05:00
Barnabas Jovanovics
cfec396f99
fix: load fails because of empty list instead of query (#847) 2024-01-24 11:18:51 -05:00
Zach Daniel
66295c4efb improvement: derive source_attribute_on_join_resource for many to many 2024-01-23 23:43:02 -05:00
Zach Daniel
13bff0a9cd fix: don't attempt to derive destination_attribute_on_join_resource 2024-01-23 23:38:52 -05:00
Zach Daniel
1f96993e1b chore: fix typo accessing action 2024-01-23 23:22:39 -05:00
Zach Daniel
fe3215cc07 improvement: atomic implementation for relate_actor
improvement: include a message along with the non-atomic signifier
2024-01-23 22:41:15 -05:00
Zach Daniel
3e87e6220f improvement: support transactions on bulk destroys 2024-01-23 22:10:14 -05:00
Zach Daniel
bf81f8c8a5 chore: format 2024-01-23 21:48:38 -05:00
Zach Daniel
1807523ba2 improvement: support transactions in bulk updates 2024-01-23 21:36:17 -05:00
Zach Daniel
878011bd3e improvement: count_nils/1 function
improvement: `present/absent` atomic implementation
improvement: add `atomic_ref/1` template helper
2024-01-23 19:13:14 -05:00
Jinkyou Son
2368fe82b6
improvement: Change typespec of tenant from String.t() to term() (#845) 2024-01-23 13:16:04 -05:00
Dmitry Maganov
91c34c3939
fix: join_relationship in many to many can make through optional (#846) 2024-01-23 13:15:51 -05:00
Barnabas Jovanovics
c60c5111ae
fix: make sure query has action (#844) 2024-01-23 10:42:34 -05:00
Barnabas Jovanovics
f25d7edc2f
fix: pass in actor to api.can call (#843)
* fix: pass in actor to api.can call

* only call api.can if authorize? is true
2024-01-23 09:22:19 -05:00
Nduati Kuria
d229ade9fc
Add :decimal aggregate support to DataLayer.Ets [WIP] (#841)
* Add `:decimal` aggregate support to `DataLayer.Ets`

* Add regression test

* Fix dialyzer

* Handle nils in `:avg` calculation

* Refactor nested ifs

* Refactor test
2024-01-22 16:03:34 -05:00
Barnabas Jovanovics
4ffd3cfa11
fix: do not check primary key fields in filter (#839) 2024-01-22 11:31:20 -05:00
Barnabas Jovanovics
20880691fb
fix: add page opts to context again (#838) 2024-01-22 11:29:13 -05:00
Zach Daniel
7b40917516 fix: return errors with query from read action
closes #837
2024-01-21 13:55:01 -05:00
Zach Daniel
ecf4893b64 fix: properly set defaults on upsert in mnesia 2024-01-21 12:06:16 -05:00
Zach Daniel
45be2a34eb chore: format 2024-01-21 01:27:08 -05:00
Zach Daniel
ce4c3cb2c1 fix: don't load through attributes twice, but also don't miss any 2024-01-21 01:26:22 -05:00
Zach Daniel
d013818c0a improvement: handle pkey-less resources when attaching fields
improvement: set lazy defaults when applying changeset attributes
2024-01-21 00:45:35 -05:00