Commit graph

1036 commits

Author SHA1 Message Date
Zach Daniel
d03915b194 fix: map update bug when sanitizing boolean expressions 2022-08-07 19:46:01 -04:00
Zach Daniel
8a2208601c improvement: add actor_present policy 2022-08-07 01:16:50 -04:00
Zach Daniel
fe12f40056 fix: fixs runtime filter fallbacks
improvement: add `error?` option to get
2022-08-05 11:58:01 -04:00
Zach Daniel
6aaab781e0 chore: remove debug logs 2022-08-04 16:55:53 -04:00
Zach Daniel
10f2b14d97 improvement: fix various operator evaluators
docs: improve docs
2022-08-04 16:50:56 -04:00
Zach Daniel
c8628066de fix: (attempt) to fix calc loading issue 2022-08-03 11:13:02 -04:00
Zach Daniel
f823e35f7d fix: actually use warn_on_empty? config 2022-08-01 19:23:16 -04:00
Zach Daniel
32bab0959d chore: add moduledocs for WarnOnEmpty 2022-08-01 14:52:56 -04:00
Zach Daniel
c0404af740 improvement: add warnings to DSL transformer returns
improvement: warn on empty registries

closes #359
2022-08-01 14:43:38 -04:00
Zach Daniel
285c7db5be docs: small docs updates 2022-07-26 02:46:01 -04:00
Zach Daniel
d94ebf8883 docs: fix guide links 2022-07-25 21:14:32 -04:00
Zach Daniel
a07b8bb2f6 docs: properly format links 2022-07-25 18:53:37 -04:00
Zach Daniel
ca9c80b6b0 improvement: better sanitization around sensitive attributes in filters
docs: general doc improvements
2022-07-25 18:47:30 -04:00
Zach Daniel
0b18be167e docs: improve docs/small error message tweak 2022-07-25 15:56:52 -04:00
Zach Daniel
951c3051b9 fix: check for actor on query/changeset for actor context 2022-07-22 15:21:11 -04:00
zimt28
d24888b0eb
docs: update authorization section examples. 2022-07-22 14:26:26 -04:00
Zach Daniel
026ac43493 fix: pass actor opt down 2022-07-22 00:59:34 -04:00
Zach Daniel
347907029b improvement: change always_authorize? to authorize for multiple options 2022-07-21 22:23:18 -04:00
Zach Daniel
22a598d6d6 fix: don't skip setting tenant when actor is present 2022-07-21 18:24:57 -04:00
Zach Daniel
6c277a1a59 fix: don't use apply/3 on kernel macros 2022-07-21 14:02:56 -04:00
Zach Daniel
552af4b665 fix: small bug in DSL transformer manipulation. 2022-07-21 14:01:44 -04:00
Zach Daniel
331d0cf66c fix: && and || don't short-circuit to nil 2022-07-20 15:46:14 -04:00
Zach Daniel
7b9861dc2c fix: {:ok, _} -> {:known, _} when evaluating operators 2022-07-20 15:44:03 -04:00
Zach Daniel
8036c268d6 fix: fix bad evaluation case for operators 2022-07-20 15:12:37 -04:00
Zach Daniel
ebef8057c8 improvement: add error message for manual action missed 2022-07-20 13:38:26 -04:00
Zach Daniel
75ca760c9f fix: ensure we only take unique related records when lazy loading 2022-07-20 01:12:53 -04:00
Zach Daniel
98a64577d9 improvement: add || and && operators
improvement: sort parsing helpers
test: fix flaky test
2022-07-19 19:15:23 -04:00
Zach Daniel
8f23cc71fb improvement: add Ash.Sort.parse_input!/2 2022-07-19 13:34:01 -04:00
zimt28
81c085b9a3
improvemtn: Add accept_default option (#351)
* Add accept_default option
2022-07-19 10:03:23 -04:00
Zach Daniel
fe27a7f61b improvement: add transfer_context/1 and get_context_for_transfer/0 2022-07-19 09:59:57 -04:00
Zach Daniel
c9f20f1488 improvement: add process-based actor, tenant and query/changeset context
improvement: add `always_authorize?` and `require_actor?` to api config
2022-07-19 00:49:05 -04:00
zimt28
bc05fb5b47
Deprecate option type helper (#352) 2022-07-18 15:22:17 -04:00
Zach Daniel
e83fcf13fb fix: use Map.get/2 when getting paths if the value is a struct 2022-07-15 22:02:59 -04:00
Zach Daniel
594698986e improvement: support paths in actor/1 2022-07-15 21:42:30 -04:00
Zach Daniel
e86887b8b8 improvement: add default guide to doc_index 2022-07-14 11:41:20 -04:00
Zach Daniel
611603c7d3 docs: add info for can/4 2022-07-14 10:45:55 -04:00
Frank Dugan III
3776af9f85
feat: add can?/4 policy utility (#349)
* feat: add can?/4 policy utility

* refactor: change defaults and add can/4

* refactor: add typespecs, rename test
2022-07-14 10:05:51 -04:00
Zach Daniel
a023aaff95 fix: make mnesia and ets work properly when sharing tables
fix: make updates properly merge with mnesia and ets
fix: `attribute_writable?` also makes it public
2022-07-13 15:05:55 -04:00
Zach Daniel
5a4a3009d9 docs: update seed docs on __keep_nil__ 2022-07-12 01:26:13 -04:00
Zach Daniel
ba559936d8 improvement: code_interface optional arguments
test: add some load tests
2022-07-11 22:59:51 -04:00
Zach Daniel
0f3521b2f4 improvement: improve behavior of lazy?: true option
before, any calculation that determined that it needed to load
would always load its dependencies, but now if they are already loaded
then dependencies won't be reloaded
2022-07-11 21:31:50 -04:00
Zach Daniel
a9f93c1ca3 chore: ignore unnecessary sobelow error 2022-07-10 23:45:26 -04:00
Zach Daniel
4d3c393342 docs: small docs tweaks, more modules 2022-07-10 23:39:57 -04:00
Zach Daniel
b7a9cd33ac chore: typo in doc index 2022-07-10 17:05:03 -04:00
Zach Daniel
46a6bb407d chore: docs in priv/ 2022-07-10 16:06:22 -04:00
Zach Daniel
0b158ca487 docs: work on DSL documentation 2022-07-10 15:05:09 -04:00
Maciej Malecki
9707b4b7fe
Use a proper operator in the attribute_does_not_equal validation (#348)
Previously, it was using `if current != expected do raise` while it
needs to do the opposite. Also, simplify the logic by making `update`
work in the same way as `create` (compare upcoming value - not the
original one).
2022-07-07 14:12:32 -04:00
Zach Daniel
f2bf8bccac improvement: add back in DSL docs 2022-07-06 08:37:00 -04:00
Zach Daniel
40904cae80 fix: add back in writable? option to relationships, and add attribute_writable? to belongs_to 2022-07-06 08:30:13 -04:00
Zach Daniel
394e2d089a improvement: add match_other_defaults? to attribute 2022-07-05 10:18:50 -04:00
Zach Daniel
b71aa3ddeb fix: don't rescue arbitrary exception/exits 2022-07-05 09:32:06 -04:00
Zach Daniel
ac4590a0ca improvement: remove relationship writability, as it all happens through arguments now
improvement: repurpose `writable?` on `belongs_to` to make the attribute writable
2022-07-05 08:16:38 -04:00
Zach Daniel
15cd3fb7bc fix: fix return type for dump/3 ecto type 2022-06-30 22:10:37 -04:00
Zach Daniel
dd3b261a69 chore: update error types in Ash.Type 2022-06-30 22:00:24 -04:00
Zach Daniel
8cc6d014e7 fix: load/3 returns {:ok, value} | :error 2022-06-30 13:31:57 -04:00
Zach Daniel
0d9f075c0d fix: ensure type is always set on attributes
docs: add more policy docs
2022-06-28 15:16:29 -04:00
Zach Daniel
f718ee94e7 improvement: new timeout error message and test it 2022-06-27 15:57:30 -04:00
Zach Daniel
5d269d046e fix: don't try to read files that don't exist 2022-06-27 13:36:58 -04:00
Zach Daniel
ef3d1ea398 improvement: Ash.Generator 2022-06-21 21:00:47 -04:00
Zach Daniel
1d50c7aa79 improvement: add Ash.Seed module with seed helpers 2022-06-20 17:01:28 -04:00
Zach Daniel
118f62b55e fix: bad return value for destroy! + return_notifications?: true 2022-06-18 22:46:08 -04:00
Zach Daniel
19fe132717 improvement: add basic type handling for non embedded resources 2022-06-17 15:12:14 -04:00
Zach Daniel
70c6bd64ee improvement: better transformer ordering error
chore: docs
2022-06-17 10:00:04 -04:00
Zach Daniel
1df97999f4 fix: use digraph to order transformers 2022-06-16 04:10:32 -04:00
Zach Daniel
1b6fc035af chore: remove unnecessary change 2022-06-16 02:51:48 -04:00
Zach Daniel
6aa0c0b591 fix: things breaking due to stricter expectations on type function inputs 2022-06-16 01:57:04 -04:00
Zach Daniel
9a60877f22 chore: simplify is?/2 2022-06-16 00:55:07 -04:00
Zach Daniel
0804ad6e85 improvement: don't pay massive costs of a function undefined error 2022-06-16 00:50:02 -04:00
Zach Daniel
abf25dafbb fix: depend on all entries in registry 2022-06-14 20:30:13 -04:00
Zach Daniel
329accd565 improvement: optimize related resource inclusion check 2022-06-14 15:42:38 -04:00
Zach Daniel
5b0a5d238b fix: don't disable lexical tracker for extensions 2022-06-14 14:39:17 -04:00
Zach Daniel
56656deda4 fix: properly set the changed? context 2022-06-10 10:09:49 -04:00
Zach Daniel
4b57bcc8c7 improvement: add resource to notification warning 2022-06-10 09:52:07 -04:00
Zach Daniel
e19ca1ec66 fix: always return all notifications if return_notifications?: true 2022-06-09 13:52:32 -04:00
Zach Daniel
084b998cab improvement: add config :ash, :pub_sub, debug?: true 2022-06-09 11:00:53 -04:00
Zach Daniel
ae823e3539 improvement: add from to notification, and notification_metadata to api 2022-06-08 13:16:42 -04:00
Zach Daniel
74dc200c01 docs: more work on docs 2022-06-07 15:31:09 -04:00
Zach Daniel
dd3b212008 chore: try escaping html 2022-06-07 15:07:11 -04:00
Zach Daniel
df14b30a8a docs: add Ash.DocIndex to doc index 2022-06-07 15:04:42 -04:00
Zach Daniel
ff890e4654 docs: more work on doc replacements/info 2022-06-07 14:57:30 -04:00
Zach Daniel
b0e58ab57d docs: fix route for overview 2022-06-05 15:06:01 -04:00
Zach Daniel
dc2f57423b fix: read file at compile time for doc index 2022-06-05 14:42:03 -04:00
Zach Daniel
091251869f chore: reorder overview 2022-06-05 14:28:51 -04:00
Zach Daniel
dc14f4016a chore: fix guide reference 2022-06-05 13:45:54 -04:00
Zach Daniel
74a1a6c97c docs: work on docs + link structure 2022-06-05 13:05:10 -04:00
Zach Daniel
ae65d09373 docs: work on docs structure 2022-06-05 12:13:29 -04:00
Zach Daniel
0d7eac7829 chore: fix typespec 2022-06-04 17:05:49 -04:00
Zach Daniel
a626f8d92d fix: when casting atom -> string, stringify it first
*duh*
2022-06-03 20:35:36 -04:00
Zach Daniel
bdfdc778e0 fix: move preparation init to runtime 2022-06-02 23:53:38 -04:00
Zach Daniel
571c138140 improvement: add identity_priority and use_identities option to manage_relationship 2022-06-02 02:08:36 -04:00
Zach Daniel
f8164f6745 improvement: support limit in simple data layer 2022-06-01 23:54:01 -04:00
Zach Daniel
393dd7326f fix: don't automatically url encode keyset values 2022-05-31 12:18:52 -04:00
Simon Bergström
71884dfa5f
fix: fixed bug wher embedded resources would always provide defaults, not allowing you to declare your own (primary?) actions (#339) 2022-05-31 11:58:56 -04:00
Zach Daniel
93424fd16a fix: keyset pagination counts all rows 2022-05-31 11:56:15 -04:00
Zach Daniel
6d0cbec244 fix: fetch items closest to cursor by reversing keyset sort 2022-05-31 11:17:14 -04:00
Zach Daniel
669c98b379 fix: keyset + before results must be reversed 2022-05-31 10:34:35 -04:00
Theo Harris
021d859990
docs: Fix code block that wrapped non-code text (#341) 2022-05-31 10:19:10 -04:00
Theo Harris
4aac381cb1
docs: Add clarifying language around the use of the Enum module (#340) 2022-05-31 10:18:42 -04:00
Zach Daniel
067228980e improvement: add key to InvalidKeyset error 2022-05-30 16:41:49 -04:00
Zach Daniel
7a0cfd3ab1 improvement: better error message on invalid keyset
closes #336
2022-05-30 16:32:17 -04:00