Logical disjunction (aka "OR" operator) in conditions
guicassolato opened this issue · comments
Guilherme Cassolato commented
RFE: Add support for Logical disjunction (aka "OR" operator) in when
conditions.
Possible steps for implementation
- Add 2 fields to the
JSONPattern
(v1beta1) andPatternExpressionOrRef
(v1beta2) types:All []JSONPattern / []PatternExpressionOrRef `json:"all,omitempty"` Any []JSONPattern / []PatternExpressionOrRef `json:"any,omitempty"`
- Modify all internal
Conditions
field of the evaluators to a new type that withholds the new logical operationall
andany
- Modify the
*AuthPipeline. evaluateConditions
function to support the new operations – recursion will be needed - (Optional) Define a new
pkg/conditions
package for everything related to the implementation of conditions (types, interfaces and functions)