mirror of
https://github.com/Icinga/icingaweb2.git
synced 2026-05-28 04:02:39 -04:00
parent
a75b1a35c6
commit
aa567f8cd7
1 changed files with 34 additions and 0 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue