diff --git a/application/controllers/UsergroupbackendController.php b/application/controllers/UsergroupbackendController.php
index 91560bf55..e03880637 100644
--- a/application/controllers/UsergroupbackendController.php
+++ b/application/controllers/UsergroupbackendController.php
@@ -15,6 +15,14 @@ use Icinga\Web\Url;
*/
class UsergroupbackendController extends Controller
{
+ /**
+ * Initialize this controller
+ */
+ public function init()
+ {
+ $this->assertPermission('config/application/usergroupbackend');
+ }
+
/**
* Redirect to this controller's list action
*/
@@ -28,7 +36,6 @@ class UsergroupbackendController extends Controller
*/
public function listAction()
{
- $this->assertPermission('config/application/usergroupbackend/*');
$this->view->backendNames = Config::app('groups')->keys();
$this->getTabs()->add(
'usergroupbackend/list',
@@ -45,8 +52,6 @@ class UsergroupbackendController extends Controller
*/
public function createAction()
{
- $this->assertPermission('config/application/usergroupbackend/create');
-
$form = new UserGroupBackendForm();
$form->setRedirectUrl('usergroupbackend/list');
$form->setTitle($this->translate('Create New User Group Backend'));
@@ -78,7 +83,6 @@ class UsergroupbackendController extends Controller
*/
public function editAction()
{
- $this->assertPermission('config/application/usergroupbackend/edit');
$backendName = $this->params->getRequired('backend');
$form = new UserGroupBackendForm();
@@ -118,7 +122,6 @@ class UsergroupbackendController extends Controller
*/
public function removeAction()
{
- $this->assertPermission('config/application/usergroupbackend/remove');
$backendName = $this->params->getRequired('backend');
$backendForm = new UserGroupBackendForm();
diff --git a/application/forms/Security/RoleForm.php b/application/forms/Security/RoleForm.php
index 43ae6c1a0..93f5db014 100644
--- a/application/forms/Security/RoleForm.php
+++ b/application/forms/Security/RoleForm.php
@@ -27,6 +27,7 @@ class RoleForm extends ConfigForm
'config/application/general' => 'config/application/general',
'config/application/authentication' => 'config/application/authentication',
'config/application/resources' => 'config/application/resources',
+ 'config/application/usergroupbackend' => 'config/application/usergroupbackend',
'config/application/roles' => 'config/application/roles',
'config/application/users/*' => 'config/application/users/*',
'config/application/users/show' => 'config/application/users/show',
@@ -40,10 +41,6 @@ class RoleForm extends ConfigForm
'config/application/groups/remove' => 'config/application/groups/remove',
'config/application/groups/member/add' => 'config/application/groups/member/add',
'config/application/groups/member/remove' => 'config/application/groups/member/remove',
- 'config/application/usergroupbackend/*' => 'config/application/usergroupbackend/*',
- 'config/application/usergroupbackend/create' => 'config/application/usergroupbackend/create',
- 'config/application/usergroupbackend/edit' => 'config/application/usergroupbackend/edit',
- 'config/application/usergroupbackend/remove' => 'config/application/usergroupbackend/remove',
'config/modules' => 'config/modules'
);
diff --git a/application/views/scripts/usergroupbackend/list.phtml b/application/views/scripts/usergroupbackend/list.phtml
index d98d207f1..58aa2deba 100644
--- a/application/views/scripts/usergroupbackend/list.phtml
+++ b/application/views/scripts/usergroupbackend/list.phtml
@@ -1,15 +1,7 @@
-hasPermission('config/application/usergroupbackend/create');
-$editPermitted = $this->hasPermission('config/application/usergroupbackend/edit');
-$removePermitted = $this->hasPermission('config/application/usergroupbackend/remove');
-
-?>
= $tabs; ?>
-
= $this->qlink(
$this->translate('Create A New User Group Backend'),
'usergroupbackend/create',
@@ -18,33 +10,25 @@ $removePermitted = $this->hasPermission('config/application/usergroupbackend/rem
'icon' => 'plus'
)
); ?>
-
0): ?>
= $this->translate('Backend'); ?> |
-
= $this->translate('Remove'); ?> |
-
-
= $this->qlink(
$backendName,
'usergroupbackend/edit',
array('backend' => $backendName),
array('title' => sprintf($this->translate('Edit user group backend %s'), $backendName))
); ?>
-
- = $this->escape($backendName); ?>
-
|
-
= $this->qlink(
null,
'usergroupbackend/remove',
@@ -54,7 +38,6 @@ $removePermitted = $this->hasPermission('config/application/usergroupbackend/rem
'icon' => 'trash'
)
); ?> |
-
diff --git a/library/Icinga/Web/Menu.php b/library/Icinga/Web/Menu.php
index 4dff8e735..ef27204c8 100644
--- a/library/Icinga/Web/Menu.php
+++ b/library/Icinga/Web/Menu.php
@@ -261,7 +261,7 @@ class Menu implements RecursiveIterator
));
$section->add(t('UserGroupBackends'), array(
'url' => 'usergroupbackend/list',
- 'permission' => 'config/application/usergroupbackend/*',
+ 'permission' => 'config/application/usergroupbackend',
'priority' => 830
));
$section->add(t('Modules'), array(