From 1cd2cfbdc944901b9379bbd1e1d53f8dbafc46fa Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Thu, 20 Oct 2016 18:28:19 +0200 Subject: [PATCH] Revert "Make hooks respect module permissions" This reverts commit 4d2e6d2d8709da9168af824c36458dd5857b08a8. --- library/Icinga/Application/Modules/Module.php | 26 ++++++++----------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/library/Icinga/Application/Modules/Module.php b/library/Icinga/Application/Modules/Module.php index 555127228..de40266e1 100644 --- a/library/Icinga/Application/Modules/Module.php +++ b/library/Icinga/Application/Modules/Module.php @@ -4,7 +4,6 @@ namespace Icinga\Application\Modules; use Exception; -use Icinga\Authentication\Auth; use Zend_Controller_Router_Route; use Zend_Controller_Router_Route_Abstract; use Zend_Controller_Router_Route_Regex; @@ -1283,22 +1282,19 @@ class Module */ protected function provideHook($name, $implementation = null, $key = null) { - if (Auth::getInstance()->hasPermission('module/' . $this->name)) { - if ($implementation === null) { - $implementation = $name; - } - - if (strpos($implementation, '\\') === false) { - $class = $this->getNamespace() - . '\\ProvidedHook\\' - . $this->slashesToNamespace($implementation); - } else { - $class = $implementation; - } - - Hook::register($name, $class, $class); + if ($implementation === null) { + $implementation = $name; } + if (strpos($implementation, '\\') === false) { + $class = $this->getNamespace() + . '\\ProvidedHook\\' + . $this->slashesToNamespace($implementation); + } else { + $class = $implementation; + } + + Hook::register($name, $class, $class); return $this; }