-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ucast-prisma: laxer handling of empty OR/AND
- Loading branch information
Showing
4 changed files
with
60 additions
and
19 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
"@styra/ucast-prisma": patch | ||
--- | ||
|
||
Introduce laxer handling of empty compound conditions | ||
|
||
This aligns better with common Rego patterns, like using multi-value | ||
rules for generating conditions: | ||
|
||
```rego | ||
conditions.or contains {"tickets.resolved": false} if { ... } | ||
``` | ||
|
||
If the RHS is not satisfied, the conditions would yield | ||
|
||
```json | ||
{ | ||
"conditions": { | ||
"or": [] | ||
} | ||
} | ||
``` | ||
|
||
and with this change, this will be valid. The condition itself is | ||
going to be dropped. |
This file contains 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
This file contains 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
This file contains 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