diff --git a/library/Icinga/Web/Controller/ActionController.php b/library/Icinga/Web/Controller/ActionController.php index 0703e4e98..655a85aca 100644 --- a/library/Icinga/Web/Controller/ActionController.php +++ b/library/Icinga/Web/Controller/ActionController.php @@ -179,7 +179,7 @@ class ActionController extends Zend_Controller_Action */ public function assertPermission($permission) { - if ($this->requiresAuthentication && ! $this->Auth()->hasPermission($permission)) { + if (! $this->Auth()->hasPermission($permission)) { throw new SecurityException('No permission for %s', $permission); } } diff --git a/library/Icinga/Web/Controller/ModuleActionController.php b/library/Icinga/Web/Controller/ModuleActionController.php index 1ae32e10c..38826a84c 100644 --- a/library/Icinga/Web/Controller/ModuleActionController.php +++ b/library/Icinga/Web/Controller/ModuleActionController.php @@ -26,7 +26,8 @@ class ModuleActionController extends ActionController protected function prepareInit() { $this->moduleInit(); - if ($this->getFrontController()->getDefaultModule() !== $this->getModuleName()) { + if ($this->requiresLogin() + && $this->getFrontController()->getDefaultModule() !== $this->getModuleName()) { $this->assertPermission(Manager::MODULE_PERMISSION_NS . $this->getModuleName()); } }