What's Changed
Fixes
- Fixed access policy rules that traverse a self relation. Relation subqueries referenced the related table by its bare model name, so when the relation pointed back to the same model, the inner table shadowed the outer row and conditions like
parent.tenantId != this.tenantIdwere evaluated entirely against the inner table - as a result may incorrectly enforce policy rules.
Additional notes
If you use access policies over self relations, we recommend upgrading. Rules that previously appeared to work may have been passing unconditionally; after upgrading they will be enforced as written, so some operations that used to succeed may now be denied. Please test thoroughly after upgrading.
Full Changelog: v3.9.4...v3.9.5