aamplugin / advanced-access-manager

WordPress Advanced Access Manager Plugin
Other
30 stars 14 forks source link

Add "in" and "not in" operand to the Hook filters #367

Closed aamplugin closed 3 months ago

aamplugin commented 3 months ago

Allow the ability to filter out properties for the return value with in and not in operands.

For example, the following policy will remove all key/value pairs from the array that do not have de or fr key:

{
    "Statement": [
        {
            "Effect": "override",
            "Resource": "Hook:icl_ls_languages",
            "Response": "&:filter($key !in [de,fr])"
        }
    ]
}