mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-26 23:34:08 +02:00
monitoring: Combine restrictions w/ OR
If a user has more than one filter for the same restriction, the filters will be combined w/ or. The combined filters will then be applied w/ AND to the query. refs #9009
This commit is contained in:
parent
41be32adff
commit
7793b61e4c
@ -58,9 +58,11 @@ class Controller extends IcingaWebController
|
|||||||
*/
|
*/
|
||||||
protected function applyRestriction($restriction, Filterable $view)
|
protected function applyRestriction($restriction, Filterable $view)
|
||||||
{
|
{
|
||||||
|
$restrictions = Filter::matchAny();
|
||||||
foreach ($this->getRestrictions($restriction) as $filter) {
|
foreach ($this->getRestrictions($restriction) as $filter) {
|
||||||
$view->applyFilter(Filter::fromQueryString($filter));
|
$restrictions->addFilter(Filter::fromQueryString($filter));
|
||||||
}
|
}
|
||||||
|
$view->applyFilter($restrictions);
|
||||||
return $view;
|
return $view;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user