ZenStack Release v1.3.0
New Features
- The new
zenstack repl
command. Use it to interactively call PrismaClient methods, with or without ZenStack enhancement. doc. - [Preview] Automatic optimistic update for tanstack-query hooks. You can now pass a flag to let mutations automatically update related queries optimistically. doc.
- You can use collection predicate with
auth()
expression now. E.g.:@@allow('update', auth().roles?[permission == ADMIN])
. Note that you still need to make sure the user context object you passed toenhance()
include all fields (recursively) used in the expression. #803
Improvements and Fixes
- Field-level policy: fixed the issue that when a field only has deny rules, access is rejected even if the rules don't satisfy #811
- Field-level policy: fixed the issue that policies don't cover relations by @tlancina #814
- Field-level policy: entire "update" policy check is postponed to post-update stage if there's any "post-update" rules. #825
- Fixed validation rules for
@db.TinyInt
attribute by @elsantoalcielo in #821
New Contributors
- Welcome @elsantoalcielo as our new CONTRIBUTOR! Thank you all for making ZenStack a better product ❤️ @tlancina @jasonmacdonald @elsantoalcielo !
Full Changelog: v1.2.2...v1.3.0