mirror of
https://github.com/microsoft/regorus.git
synced 2026-08-05 02:16:11 +00:00
Handle undefined values correctly in ordered-else. Previously an undefined value in one of the blocks could cause the entire rule to evaluate to undefined. Handle undefined values correctly in generic rule refs to prevent them from propagating to output. Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
27 lines
518 B
YAML
27 lines
518 B
YAML
# Copyright (c) Microsoft Corporation.
|
|
# Licensed under the MIT License.
|
|
|
|
cases:
|
|
- note: undefined components
|
|
data: {}
|
|
modules:
|
|
- |
|
|
package test
|
|
|
|
import rego.v1
|
|
|
|
principal := input.principal
|
|
action := input.action
|
|
|
|
p[principal][action] := 1 if {
|
|
some a in []
|
|
}
|
|
|
|
q[principal][action] contains 1 if {
|
|
some a in []
|
|
}
|
|
query: data.test
|
|
want_result:
|
|
p: {}
|
|
q: {}
|