Security: Rename system/config/authentication to config/application/authentication

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:
Eric Lippmann 2015-03-12 14:44:45 +01:00
parent 956bc3c07a
commit a4e81c320a
3 changed files with 13 additions and 13 deletions

View File

@ -45,7 +45,7 @@ class ConfigController extends ActionController
));
$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'),
@ -199,7 +199,7 @@ class ConfigController extends ActionController
*/
public function authenticationAction()
{
$this->assertPermission('system/config/authentication');
$this->assertPermission('config/application/authentication');
$form = new AuthenticationBackendReorderForm();
$form->setIniConfig(Config::app('authentication'));
$form->handleRequest();
@ -214,7 +214,7 @@ class ConfigController extends ActionController
*/
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(
@ -236,7 +236,7 @@ class ConfigController extends ActionController
*/
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'));
@ -254,7 +254,7 @@ class ConfigController extends ActionController
*/
public function removeauthenticationbackendAction()
{
$this->assertPermission('system/config/authentication');
$this->assertPermission('config/application/authentication');
$form = new ConfirmRemovalForm(array(
'onSuccess' => function ($form) {
$configForm = new AuthenticationBackendConfigForm();

View File

@ -30,7 +30,7 @@ class RolesController extends ActionController
'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'),

View File

@ -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'
);
/**