mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-26 07:14:35 +02:00
monitoring/security: Require a Filterable instead of a DataView in applyRestriction()
This commit is contained in:
parent
3cbafe16f6
commit
b2f93abb12
@ -5,8 +5,8 @@
|
|||||||
namespace Icinga\Module\Monitoring;
|
namespace Icinga\Module\Monitoring;
|
||||||
|
|
||||||
use Icinga\Data\Filter\Filter;
|
use Icinga\Data\Filter\Filter;
|
||||||
|
use Icinga\Data\Filterable;
|
||||||
use Icinga\File\Csv;
|
use Icinga\File\Csv;
|
||||||
use Icinga\Module\Monitoring\DataView\DataView;
|
|
||||||
use Icinga\Web\Controller\ModuleActionController;
|
use Icinga\Web\Controller\ModuleActionController;
|
||||||
use Icinga\Web\Url;
|
use Icinga\Web\Url;
|
||||||
|
|
||||||
@ -67,11 +67,11 @@ class Controller extends ModuleActionController
|
|||||||
* Apply a restriction on the given data view
|
* Apply a restriction on the given data view
|
||||||
*
|
*
|
||||||
* @param string $restriction The name of restriction
|
* @param string $restriction The name of restriction
|
||||||
* @param DataView $view The view to restrict
|
* @param Filterable $filterable The filterable to restrict
|
||||||
*
|
*
|
||||||
* @return DataView $view
|
* @return Filterable The filterable
|
||||||
*/
|
*/
|
||||||
protected function applyRestriction($restriction, DataView $view)
|
protected function applyRestriction($restriction, Filterable $view)
|
||||||
{
|
{
|
||||||
foreach ($this->getRestrictions($restriction) as $filter) {
|
foreach ($this->getRestrictions($restriction) as $filter) {
|
||||||
$view->applyFilter(Filter::fromQueryString($filter));
|
$view->applyFilter(Filter::fromQueryString($filter));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user