mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-24 22:34:24 +02:00
Security: Rename system/config/resources to config/application/resources
Module config permission and application config permission have to be separeted. Application config related permissions will be added beneath config/application and module related config permissions will be added beneath config/modules. refs #8720
This commit is contained in:
parent
a4e81c320a
commit
08abbda152
@ -53,7 +53,7 @@ class ConfigController extends ActionController
|
|||||||
));
|
));
|
||||||
$allowedActions[] = 'authentication';
|
$allowedActions[] = 'authentication';
|
||||||
}
|
}
|
||||||
if ($auth->hasPermission('system/config/resources')) {
|
if ($auth->hasPermission('config/application/resources')) {
|
||||||
$tabs->add('resource', array(
|
$tabs->add('resource', array(
|
||||||
'title' => $this->translate('Configure which resources are being utilized by Icinga Web 2'),
|
'title' => $this->translate('Configure which resources are being utilized by Icinga Web 2'),
|
||||||
'label' => $this->translate('Resources'),
|
'label' => $this->translate('Resources'),
|
||||||
@ -292,7 +292,7 @@ class ConfigController extends ActionController
|
|||||||
*/
|
*/
|
||||||
public function resourceAction()
|
public function resourceAction()
|
||||||
{
|
{
|
||||||
$this->assertPermission('system/config/resources');
|
$this->assertPermission('config/application/resources');
|
||||||
$this->view->resources = Config::app('resources', true)->keys();
|
$this->view->resources = Config::app('resources', true)->keys();
|
||||||
$this->view->tabs->activate('resource');
|
$this->view->tabs->activate('resource');
|
||||||
}
|
}
|
||||||
@ -302,7 +302,7 @@ class ConfigController extends ActionController
|
|||||||
*/
|
*/
|
||||||
public function createresourceAction()
|
public function createresourceAction()
|
||||||
{
|
{
|
||||||
$this->assertPermission('system/config/resources');
|
$this->assertPermission('config/application/resources');
|
||||||
$form = new ResourceConfigForm();
|
$form = new ResourceConfigForm();
|
||||||
$form->setTitle($this->translate('Create A New Resource'));
|
$form->setTitle($this->translate('Create A New Resource'));
|
||||||
$form->addDescription($this->translate('Resources are entities that provide data to Icinga Web 2.'));
|
$form->addDescription($this->translate('Resources are entities that provide data to Icinga Web 2.'));
|
||||||
@ -319,7 +319,7 @@ class ConfigController extends ActionController
|
|||||||
*/
|
*/
|
||||||
public function editresourceAction()
|
public function editresourceAction()
|
||||||
{
|
{
|
||||||
$this->assertPermission('system/config/resources');
|
$this->assertPermission('config/application/resources');
|
||||||
$form = new ResourceConfigForm();
|
$form = new ResourceConfigForm();
|
||||||
$form->setTitle($this->translate('Edit Existing Resource'));
|
$form->setTitle($this->translate('Edit Existing Resource'));
|
||||||
$form->setIniConfig(Config::app('resources'));
|
$form->setIniConfig(Config::app('resources'));
|
||||||
@ -335,7 +335,7 @@ class ConfigController extends ActionController
|
|||||||
*/
|
*/
|
||||||
public function removeresourceAction()
|
public function removeresourceAction()
|
||||||
{
|
{
|
||||||
$this->assertPermission('system/config/resources');
|
$this->assertPermission('config/application/resources');
|
||||||
$form = new ConfirmRemovalForm(array(
|
$form = new ConfirmRemovalForm(array(
|
||||||
'onSuccess' => function ($form) {
|
'onSuccess' => function ($form) {
|
||||||
$configForm = new ResourceConfigForm();
|
$configForm = new ResourceConfigForm();
|
||||||
|
@ -37,7 +37,7 @@ class RolesController extends ActionController
|
|||||||
'url' => 'config/authentication'
|
'url' => 'config/authentication'
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
if ($auth->hasPermission('system/config/resources')) {
|
if ($auth->hasPermission('config/application/resources')) {
|
||||||
$tabs->add('resource', array(
|
$tabs->add('resource', array(
|
||||||
'title' => $this->translate('Configure which resources are being utilized by Icinga Web 2'),
|
'title' => $this->translate('Configure which resources are being utilized by Icinga Web 2'),
|
||||||
'label' => $this->translate('Resources'),
|
'label' => $this->translate('Resources'),
|
||||||
|
@ -26,7 +26,7 @@ class RoleForm extends ConfigForm
|
|||||||
'config/application/general' => 'config/application/general',
|
'config/application/general' => 'config/application/general',
|
||||||
'config/application/authentication' => 'config/application/authentication',
|
'config/application/authentication' => 'config/application/authentication',
|
||||||
'system/config/modules' => 'system/config/modules',
|
'system/config/modules' => 'system/config/modules',
|
||||||
'system/config/resources' => 'system/config/resources',
|
'config/application/resources' => 'config/application/resources',
|
||||||
'system/config/roles' => 'system/config/roles'
|
'system/config/roles' => 'system/config/roles'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user