booleanUnion Function Description
Description
This function takes two or more arguments that are both a bag of boolean values. It returns a bag of boolean such that it contains all elements of all the argument bags. The function gets rid of duplicates, as determined by the equality functions.
booleanUnion belongs to the ALFA function reference's
Set functions category. It maps to the XACML function identifier
urn:oasis:names:tc:xacml:1.0:function:boolean-union, takes 2 or more arguments and returns a value of type A bag of values of type boolean with no duplicates..
| Property | Value |
|---|---|
| Category | Set functions |
| # Arguments | 2 or more |
| Arguments |
|
| Return Value | A bag of values of type boolean with no duplicates. |
| Expressed As | pre-fix |
| Representation | ALFA short name |
| Allowed In Target | false |
| ALFA Shorthand | None |
| Commutative | true |
Example
/**
* Deny access if there is a false value in the union of the 2 boolean bags
* Because duplicates aren't allowed, the result of the union can at most have 2 values: true and false.
*/
rule booleanUnionExample{
deny
condition booleanIsIn(false,booleanUnion(securityChecksCleared, approvalsObtained))
}
In this example, access is denied if either security checks or approvals have not been cleared. Note that in this case, it would be easier to write an OR statement that compares the boolean value to either set of values.
Related Functions
Other functions in the Set functions category: