From 3fffd90135b382f69f312eab8c2d176a75670cfc Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Tue, 2 Jun 2015 09:04:34 +0200 Subject: [PATCH] Rename permission config/application/groups* to config/authentication/... refs #8826 --- application/controllers/GroupController.php | 10 +++++----- application/forms/Security/RoleForm.php | 10 +++++----- application/views/scripts/group/list.phtml | 4 ++-- application/views/scripts/group/show.phtml | 4 ++-- application/views/scripts/user/show.phtml | 2 +- .../Icinga/Web/Controller/AuthBackendController.php | 2 +- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/application/controllers/GroupController.php b/application/controllers/GroupController.php index 0c2a4a45d..ef95dc3fc 100644 --- a/application/controllers/GroupController.php +++ b/application/controllers/GroupController.php @@ -30,7 +30,7 @@ class GroupController extends AuthBackendController */ public function listAction() { - $this->assertPermission('config/application/groups/show'); + $this->assertPermission('config/authentication/groups/show'); $backendNames = array_map( function ($b) { return $b->getName(); }, $this->loadUserGroupBackends('Icinga\Data\Selectable') @@ -87,7 +87,7 @@ class GroupController extends AuthBackendController */ public function showAction() { - $this->assertPermission('config/application/groups/show'); + $this->assertPermission('config/authentication/groups/show'); $groupName = $this->params->getRequired('group'); $backend = $this->getUserGroupBackend($this->params->getRequired('backend')); @@ -164,7 +164,7 @@ class GroupController extends AuthBackendController */ public function addAction() { - $this->assertPermission('config/application/groups/add'); + $this->assertPermission('config/authentication/groups/add'); $backend = $this->getUserGroupBackend($this->params->getRequired('backend'), 'Icinga\Data\Extensible'); $form = new UserGroupForm(); $form->setRedirectUrl(Url::fromPath('group/list', array('backend' => $backend->getName()))); @@ -180,7 +180,7 @@ class GroupController extends AuthBackendController */ public function editAction() { - $this->assertPermission('config/application/groups/edit'); + $this->assertPermission('config/authentication/groups/edit'); $groupName = $this->params->getRequired('group'); $backend = $this->getUserGroupBackend($this->params->getRequired('backend'), 'Icinga\Data\Updatable'); @@ -205,7 +205,7 @@ class GroupController extends AuthBackendController */ public function removeAction() { - $this->assertPermission('config/application/groups/remove'); + $this->assertPermission('config/authentication/groups/remove'); $groupName = $this->params->getRequired('group'); $backend = $this->getUserGroupBackend($this->params->getRequired('backend'), 'Icinga\Data\Reducible'); diff --git a/application/forms/Security/RoleForm.php b/application/forms/Security/RoleForm.php index d321ac8fd..b3b7aa9cd 100644 --- a/application/forms/Security/RoleForm.php +++ b/application/forms/Security/RoleForm.php @@ -34,11 +34,11 @@ class RoleForm extends ConfigForm 'config/authentication/users/add' => 'config/authentication/users/add', 'config/authentication/users/edit' => 'config/authentication/users/edit', 'config/authentication/users/remove' => 'config/authentication/users/remove', - 'config/application/groups/*' => 'config/application/groups/*', - 'config/application/groups/show' => 'config/application/groups/show', - 'config/application/groups/add' => 'config/application/groups/add', - 'config/application/groups/edit' => 'config/application/groups/edit', - 'config/application/groups/remove' => 'config/application/groups/remove', + 'config/authentication/groups/*' => 'config/authentication/groups/*', + 'config/authentication/groups/show' => 'config/authentication/groups/show', + 'config/authentication/groups/add' => 'config/authentication/groups/add', + 'config/authentication/groups/edit' => 'config/authentication/groups/edit', + 'config/authentication/groups/remove' => 'config/authentication/groups/remove', 'config/application/groups/member/add' => 'config/application/groups/member/add', 'config/application/groups/member/remove' => 'config/application/groups/member/remove', 'config/modules' => 'config/modules' diff --git a/application/views/scripts/group/list.phtml b/application/views/scripts/group/list.phtml index 49d8dc4c9..bcd9dca93 100644 --- a/application/views/scripts/group/list.phtml +++ b/application/views/scripts/group/list.phtml @@ -22,8 +22,8 @@ if ($backend === null) { echo $this->translate('No backend found which is able to list groups') . ''; return; } else { - $extensible = $this->hasPermission('config/application/groups/add') && $backend instanceof Extensible; - $reducible = $this->hasPermission('config/application/groups/remove') && $backend instanceof Reducible; + $extensible = $this->hasPermission('config/authentication/groups/add') && $backend instanceof Extensible; + $reducible = $this->hasPermission('config/authentication/groups/remove') && $backend instanceof Reducible; } if (count($groups) > 0): ?> diff --git a/application/views/scripts/group/show.phtml b/application/views/scripts/group/show.phtml index 1fd3e48c6..636a449d4 100644 --- a/application/views/scripts/group/show.phtml +++ b/application/views/scripts/group/show.phtml @@ -3,10 +3,10 @@ use Icinga\Data\Extensible; use Icinga\Data\Updatable; -$extensible = $this->hasPermission('config/application/groups/add') && $backend instanceof Extensible; +$extensible = $this->hasPermission('config/authentication/groups/add') && $backend instanceof Extensible; $editLink = null; -if ($this->hasPermission('config/application/groups/edit') && $backend instanceof Updatable) { +if ($this->hasPermission('config/authentication/groups/edit') && $backend instanceof Updatable) { $editLink = $this->qlink( null, 'group/edit', diff --git a/application/views/scripts/user/show.phtml b/application/views/scripts/user/show.phtml index bccfaa21e..82f4c53f9 100644 --- a/application/views/scripts/user/show.phtml +++ b/application/views/scripts/user/show.phtml @@ -54,7 +54,7 @@ if ($this->hasPermission('config/authentication/users/edit') && $backend instanc - hasPermission('config/application/groups/show') && $membership->backend instanceof Selectable): ?> + hasPermission('config/authentication/groups/show') && $membership->backend instanceof Selectable): ?> qlink($membership->group_name, 'group/show', array( 'backend' => $membership->backend->getName(), 'group' => $membership->group_name diff --git a/library/Icinga/Web/Controller/AuthBackendController.php b/library/Icinga/Web/Controller/AuthBackendController.php index a423b8023..ad9921303 100644 --- a/library/Icinga/Web/Controller/AuthBackendController.php +++ b/library/Icinga/Web/Controller/AuthBackendController.php @@ -151,7 +151,7 @@ class AuthBackendController extends Controller ); } - if ($this->hasPermission('config/application/groups/show')) { + if ($this->hasPermission('config/authentication/groups/show')) { $tabs->add( 'group/list', array(