diff --git a/library/Icinga/Web/Controller/ModuleActionController.php b/library/Icinga/Web/Controller/ModuleActionController.php index 9286ff679..d4cbda86d 100644 --- a/library/Icinga/Web/Controller/ModuleActionController.php +++ b/library/Icinga/Web/Controller/ModuleActionController.php @@ -24,6 +24,17 @@ class ModuleActionController extends ActionController */ protected $moduleName; + /** + * Whether the module permission is required to access to module + * + * Note that module permissions do not have any effect if the controller does not require authentication. + * + * @var bool + * + * @see $requiresAuthentication For enabling/disabling whether the controller requires authentication. + */ + protected $requiresModulePermission = true; + /** * (non-PHPDoc) * @see \Icinga\Web\Controller\ActionController For the method documentation. @@ -43,6 +54,29 @@ class ModuleActionController extends ActionController { } + /** + * Get whether the module permission is required to access to module + * + * @return bool + */ + public function getRequiresModulePermission() + { + return $this->requiresModulePermission; + } + + /** + * Set whether the module permission is required to access to module + * + * @param bool $required + * + * @return $this + */ + public function setRequiresModulePermission($required) + { + $this->requiresModulePermission = (bool) $required; + return $this; + } + public function Config($file = null) { if ($file === null) {