feat: progress on the sample todo app#2
Merged
Merged
Conversation
ymc9
added a commit
that referenced
this pull request
Feb 10, 2026
ymc9
added a commit
that referenced
this pull request
Feb 10, 2026
* 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>
hechang27-sprt
added a commit
to hechang27-sprt/zenstack
that referenced
this pull request
Jun 26, 2026
…t array columns in subqueries Fix zenstackhq#1: In _member() isThis branch, pass modelOrType: context.thisType to transformRelationAccess() so that this.relation.field correctly resolves relation fields against the @@Allow model (thisType) rather than the collection predicate's model (modelOrType). Fix zenstackhq#2: In _member() when the innermost field of a subquery selection is an array type AND the provider is PostgreSQL, wrap the column with unnest() so that ANY(subquery) receives scalar rows instead of array rows. Other providers (SQLite, MySQL) leave the column as-is since they store arrays differently (JSON) and would need different handling.
hechang27-sprt
added a commit
to hechang27-sprt/zenstack
that referenced
this pull request
Jun 26, 2026
…field in operator Two PG-specific tests covering the fixes: - Fix zenstackhq#1: this.relation.field resolves against @@Allow model in collection predicates (e.g. auth().permissions?[p, p.clearance >= this.author.level]) - Fix zenstackhq#2: this.scalarField in this.relation.arrayField generates unnest() for PG subqueries (e.g. this.id in this.group.visibleDocIds)
hechang27-sprt
added a commit
to hechang27-sprt/zenstack
that referenced
this pull request
Jun 26, 2026
…field in operator Two PG-specific tests covering the fixes: - Fix zenstackhq#1: this.relation.field resolves against @@Allow model in collection predicates (e.g. auth().permissions?[p, p.clearance >= this.author.level]) - Fix zenstackhq#2: this.scalarField in this.relation.arrayField generates unnest() for PG subqueries (e.g. this.id in this.group.visibleDocIds)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.