From d71982e33386aaf4d5c8bbb29647dad660eef2d6 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Fri, 27 Apr 2018 14:10:00 +0200 Subject: [PATCH] Drop obsolete class Icinga\Web\Menu\PermittedMenuItemFilter refs #2338 --- .../Web/Menu/PermittedMenuItemFilter.php | 34 ------------------- 1 file changed, 34 deletions(-) delete mode 100644 library/Icinga/Web/Menu/PermittedMenuItemFilter.php diff --git a/library/Icinga/Web/Menu/PermittedMenuItemFilter.php b/library/Icinga/Web/Menu/PermittedMenuItemFilter.php deleted file mode 100644 index 81f44f1f6..000000000 --- a/library/Icinga/Web/Menu/PermittedMenuItemFilter.php +++ /dev/null @@ -1,34 +0,0 @@ -current(); - /** @var Menu $item */ - if (($permission = $item->getPermission()) !== null) { - $auth = Auth::getInstance(); - if (! $auth->isAuthenticated()) { - // Don't accept menu item because user is not authenticated and the menu item requires a permission - return false; - } - if (! $auth->getUser()->can($permission)) { - return false; - } - } - // Accept menu item if it does not require a permission - return true; - } -}