Commit graph

3 commits

Author SHA1 Message Date
Mike Willbanks
077f03f732
feat(zmodel): collection predicate binding (#548)
* feat: audit policy collection aliases

provides a means to alias collections in @@allow collections by extending the ast
this allows for utilizing collections inside of @@allow like:

```
memberships?[m,
    auth().memberships?[
        tenantId == m.tenantId ...
    ]
  ]
```

* fix: code review comments + syntax fixes

* refactor: extract collection predicate binding to its own language construct (#2)

- adjusted language processing chain accordingly
- fixed several issues in policy transformer/evaluator
- more test cases

* addressing PR comments

---------

Co-authored-by: Yiming Cao <yiming@whimslab.io>
Co-authored-by: ymc9 <104139426+ymc9@users.noreply.github.com>
2026-01-18 14:08:10 +08:00
Yiming Cao
3a2f1f9161
fix(language): ref resolution failure causes exception in validator (#269)
* fix(language): ref resolution failure causes exception in validator

* fix lint

* update

* fix tests
2025-09-23 19:18:58 -07:00
Yiming Cao
4ef27c7d0f
feat(policy): support comparing auth() with auth model (#244)
* feat(policy): support comparing `auth()` with auth model

* fix file name
2025-09-09 21:33:06 -07:00