Skip to main content
Version: 2.0.0

Operators

When building conditions, you need to be aware of the different types of operators you can use to construct your complex condition rules. There are two types of operators that you need to be aware of - Logical and Comparison.

Logical Operators

There are currently three types of logical operators you need to be aware of. These work like logic gates and represent a boolean function.

Logical OperatorAlias (if any)
ANDallOf
ORanyOf
NOTnot

Comparison Operators

Comparison operators enable us to construct much more complex conditions and introduce more concrete rules to our policies.

TextString used in conditionDescriptionValid for type
EQUALSequalsa = bBool, Number, String
DOES NOT EQUALnot-equalsa != bBool, Number, String
LESS THANless-thana < bNumber
GREATER THANgreater-thana > bNumber
LESS THAN EQUALSless-than-equalsa ≤ bNumber
GREATER THAN EQUALSgreater-than-equalsa ≥ bNumber
CONTAINScontains"aaa??bbbbbb"String
ARRAY CONTAINSarray_contains["a", "b", "c"] has "a"Array
ARRAY SUBSETarray_subset["a", "b"] has ["a", "b", "c"]Array
ARRAY SUPERSETarray_superset["a", "b", "c"] has ["a", "b"]Array
ARRAY INTERSECTarray_intersect["a", "b", "c"] and ["c", "d", "e"] share at least one valueArray
EQUALS REF (reference)equals-refE.G. equals user emailNumber, Array, String
NOT EQUAL REF (reference)not-equals-refE.G. not equals user keyNumber, Array, String
CONTAINS REF (reference)contains-refE.G. tenant name contains user first_nameString
ARRAY CONTAINS REF (reference)array-contains-ref["admin", "editor"] contains user roleArray
LESS THAN (reference)less-than-refa < bReference to number value E.G user.age
GREATER THAN (reference)greater-than-refa > bReference to number value E.G user.age
LESS THAN EQUALS (reference)less-than-equals-refa ≤ bReference to number value E.G user.age
GREATER THAN EQUALS (reference)greater-than-equals-refa ≥ bReference to number value E.G user.age

Now that we have a basic understanding of the language to construct conditions, lets jump into creating Condition Sets.