Skip to content

Commit

Permalink
Security: Rename system/config/authentication to config/application/a…
Browse files Browse the repository at this point in the history
…uthentication

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
  • Loading branch information
lippserd committed Mar 12, 2015
1 parent 956bc3c commit a4e81c3
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
10 changes: 5 additions & 5 deletions application/controllers/ConfigController.php
Expand Up @@ -45,7 +45,7 @@ public function init()
));
$allowedActions[] = 'application';
}
if ($auth->hasPermission('system/config/authentication')) {
if ($auth->hasPermission('config/application/authentication')) {
$tabs->add('authentication', array(
'title' => $this->translate('Configure how users authenticate with and log into Icinga Web 2'),
'label' => $this->translate('Authentication'),
Expand Down Expand Up @@ -199,7 +199,7 @@ public function moduledisableAction()
*/
public function authenticationAction()
{
$this->assertPermission('system/config/authentication');
$this->assertPermission('config/application/authentication');
$form = new AuthenticationBackendReorderForm();
$form->setIniConfig(Config::app('authentication'));
$form->handleRequest();
Expand All @@ -214,7 +214,7 @@ public function authenticationAction()
*/
public function createauthenticationbackendAction()
{
$this->assertPermission('system/config/authentication');
$this->assertPermission('config/application/authentication');
$form = new AuthenticationBackendConfigForm();
$form->setTitle($this->translate('Create New Authentication Backend'));
$form->addDescription($this->translate(
Expand All @@ -236,7 +236,7 @@ public function createauthenticationbackendAction()
*/
public function editauthenticationbackendAction()
{
$this->assertPermission('system/config/authentication');
$this->assertPermission('config/application/authentication');
$form = new AuthenticationBackendConfigForm();
$form->setTitle($this->translate('Edit Backend'));
$form->setIniConfig(Config::app('authentication'));
Expand All @@ -254,7 +254,7 @@ public function editauthenticationbackendAction()
*/
public function removeauthenticationbackendAction()
{
$this->assertPermission('system/config/authentication');
$this->assertPermission('config/application/authentication');
$form = new ConfirmRemovalForm(array(
'onSuccess' => function ($form) {
$configForm = new AuthenticationBackendConfigForm();
Expand Down
2 changes: 1 addition & 1 deletion application/controllers/RolesController.php
Expand Up @@ -30,7 +30,7 @@ public function init()
'url' => 'config'
));
}
if ($auth->hasPermission('system/config/authentication')) {
if ($auth->hasPermission('config/application/authentication')) {
$tabs->add('authentication', array(
'title' => $this->translate('Configure how users authenticate with and log into Icinga Web 2'),
'label' => $this->translate('Authentication'),
Expand Down
14 changes: 7 additions & 7 deletions application/forms/Security/RoleForm.php
Expand Up @@ -21,13 +21,13 @@ class RoleForm extends ConfigForm
* @type array
*/
protected $providedPermissions = array(
'*' => '*',
'system/config/*' => 'system/config/*',
'config/application/general' => 'config/application/general',
'system/config/authentication' => 'system/config/authentication',
'system/config/modules' => 'system/config/modules',
'system/config/resources' => 'system/config/resources',
'system/config/roles' => 'system/config/roles'
'*' => '*',
'system/config/*' => 'system/config/*',
'config/application/general' => 'config/application/general',
'config/application/authentication' => 'config/application/authentication',
'system/config/modules' => 'system/config/modules',
'system/config/resources' => 'system/config/resources',
'system/config/roles' => 'system/config/roles'
);

/**
Expand Down

0 comments on commit a4e81c3

Please sign in to comment.