mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-23 13:54:26 +02:00
parent
a75b1a35c6
commit
aa567f8cd7
@ -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…
x
Reference in New Issue
Block a user