Exceptions matchers conditions
· One min read
It is possible to add multiple matchers to an exception (user
, not_decice
, is_admin
, etc). By default if at least one of the matchers matches, the exeeption will be picked, that is to say, the conditions of the matchers are by default OR
conditions. But it is possible to change this behaviour.
matchers_conditions
matchers_conditions
is an optional paremeter of an exception (by default its value is OR
). It allows to define how the matchers conditions behave. For example, the next example will show the configuration under the exception for all admin users that are not using an iPhone excluding the user ElChiniNet
.
- YAML
- JSON
<config directory>/www/sidebar-config.yaml
exceptions:
- is_admin: true
not_device: 'iPhone'
not_user: 'ElChiniNet'
matchers_conditions: 'AND'
order:
item: 'dashboard'
hide: true
<config directory>/www/sidebar-config.json
{
"exceptions": [
{
"is_admin": true,
"not_device": "iPhone",
"not_user": "ElChiniNet",
"matchers_conditions": "AND",
"order": [
{
"item": "dashboard",
"hide": true
}
]
}
]
}