[icinga-checkins] icinga.org: icingaweb2/master: Navigation items listing: don' t rely on case sensitive usernames stored in INI files

git at icinga.org git at icinga.org
Thu Feb 11 13:55:37 CET 2016


Module: icingaweb2
Branch: master
Commit: 07913238b3633b3498a42287789ec5dc72dbdc93
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=07913238b3633b3498a42287789ec5dc72dbdc93

Author: Alexander A. Klimov <alexander.klimov at netways.de>
Date:   Wed Feb 10 16:22:51 2016 +0100

Navigation items listing: don't rely on case sensitive usernames stored in INI files

refs #11051

---

 application/controllers/NavigationController.php |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/application/controllers/NavigationController.php b/application/controllers/NavigationController.php
index 4c600a9..51b5dae 100644
--- a/application/controllers/NavigationController.php
+++ b/application/controllers/NavigationController.php
@@ -7,6 +7,7 @@ use Exception;
 use Icinga\Application\Config;
 use Icinga\Exception\NotFoundError;
 use Icinga\Data\DataArray\ArrayDatasource;
+use Icinga\Data\Filter\FilterMatchCaseInsensitive;
 use Icinga\Forms\ConfirmRemovalForm;
 use Icinga\Forms\Navigation\NavigationConfigForm;
 use Icinga\Web\Controller;
@@ -78,7 +79,7 @@ class NavigationController extends Controller
             $config->getConfigObject()->setKeyColumn('name');
             $query = $config->select();
             if ($owner !== null) {
-                $query->where('owner', $owner);
+                $query->applyFilter(new FilterMatchCaseInsensitive('owner', '=', $owner));
             }
 
             foreach ($query as $itemConfig) {



More information about the icinga-checkins mailing list