diff --git a/application/controllers/ConfigController.php b/application/controllers/ConfigController.php
index 7b01bbff5..c1d75b711 100644
--- a/application/controllers/ConfigController.php
+++ b/application/controllers/ConfigController.php
@@ -45,27 +45,12 @@ class ConfigController extends Controller
'url' => 'config/resource',
'baseTarget' => '_main'
));
- return $tabs;
- }
-
- /**
- * Create and return the tabs to display when showing authentication configuration
- */
- public function createAuthenticationTabs()
- {
- $tabs = $this->getTabs();
- $tabs->add('userbackend', array(
- 'title' => $this->translate('Configure how users authenticate with and log into Icinga Web 2'),
- 'label' => $this->translate('Users'),
+ $tabs->add('authentication', array(
+ 'title' => $this->translate('Configure the user and group backends'),
+ 'label' => $this->translate('Authentication'),
'url' => 'config/userbackend',
'baseTarget' => '_main'
));
- $tabs->add('usergroupbackend', array(
- 'title' => $this->translate('Configure how users are associated with groups by Icinga Web 2'),
- 'label' => $this->translate('User Groups'),
- 'url' => 'usergroupbackend/list',
- 'baseTarget' => '_main'
- ));
return $tabs;
}
@@ -184,17 +169,19 @@ class ConfigController extends Controller
}
/**
- * Action for listing and reordering user backends
+ * Action for listing user and group backends
*/
public function userbackendAction()
{
$this->assertPermission('config/application/userbackend');
+ $this->assertPermission('config/application/usergroupbackend');
$form = new UserBackendReorderForm();
$form->setIniConfig(Config::app('authentication'));
$form->handleRequest();
$this->view->form = $form;
- $this->createAuthenticationTabs()->activate('userbackend');
+ $this->view->backendNames = Config::app('groups');
+ $this->createApplicationTabs()->activate('authentication');
$this->render('userbackend/reorder');
}
diff --git a/application/controllers/UsergroupbackendController.php b/application/controllers/UsergroupbackendController.php
index 2f134cddd..14456fc01 100644
--- a/application/controllers/UsergroupbackendController.php
+++ b/application/controllers/UsergroupbackendController.php
@@ -29,16 +29,7 @@ class UsergroupbackendController extends Controller
*/
public function indexAction()
{
- $this->redirectNow('usergroupbackend/list');
- }
-
- /**
- * Show a list of all user group backends
- */
- public function listAction()
- {
- $this->view->backendNames = Config::app('groups');
- $this->createListTabs()->activate('usergroupbackend');
+ $this->redirectNow('config/userbackend');
}
/**
@@ -47,7 +38,7 @@ class UsergroupbackendController extends Controller
public function createAction()
{
$form = new UserGroupBackendForm();
- $form->setRedirectUrl('usergroupbackend/list');
+ $form->setRedirectUrl('config/userbackend');
$form->addDescription($this->translate('Create a new backend to associate users and groups with.'));
$form->setIniConfig(Config::app('groups'));
$form->setOnSuccess(function (UserGroupBackendForm $form) {
@@ -78,7 +69,7 @@ class UsergroupbackendController extends Controller
$backendName = $this->params->getRequired('backend');
$form = new UserGroupBackendForm();
- $form->setRedirectUrl('usergroupbackend/list');
+ $form->setRedirectUrl('config/userbackend');
$form->setIniConfig(Config::app('groups'));
$form->setOnSuccess(function (UserGroupBackendForm $form) use ($backendName) {
try {
@@ -121,7 +112,7 @@ class UsergroupbackendController extends Controller
$backendForm = new UserGroupBackendForm();
$backendForm->setIniConfig(Config::app('groups'));
$form = new ConfirmRemovalForm();
- $form->setRedirectUrl('usergroupbackend/list');
+ $form->setRedirectUrl('config/userbackend');
$form->setOnSuccess(function (ConfirmRemovalForm $form) use ($backendName, $backendForm) {
try {
$backendForm->delete($backendName);
@@ -141,23 +132,4 @@ class UsergroupbackendController extends Controller
$this->renderForm($form, $this->translate('Remove User Group Backend'));
}
-
- /**
- * Create the tabs for the application configuration
- */
- protected function createListTabs()
- {
- $tabs = $this->getTabs();
- $tabs->add('userbackend', array(
- 'title' => $this->translate('Configure how users authenticate with and log into Icinga Web 2'),
- 'label' => $this->translate('Users'),
- 'url' => 'config/userbackend'
- ));
- $tabs->add('usergroupbackend', array(
- 'title' => $this->translate('Configure how users are associated with groups by Icinga Web 2'),
- 'label' => $this->translate('User Groups'),
- 'url' => 'usergroupbackend/list'
- ));
- return $tabs;
- }
}
diff --git a/application/views/scripts/config/userbackend/reorder.phtml b/application/views/scripts/config/userbackend/reorder.phtml
index a065b6005..a8e351e5d 100644
--- a/application/views/scripts/config/userbackend/reorder.phtml
+++ b/application/views/scripts/config/userbackend/reorder.phtml
@@ -2,6 +2,7 @@
= $tabs ?>
+
= $this->translate('User Backends') ?>
= $this->qlink(
$this->translate('Create a New User Backend') ,
'config/createuserbackend',
@@ -14,4 +15,57 @@
)
) ?>
= $form ?>
+
+
= $this->translate('User Group Backends') ?>
+ = $this->qlink(
+ $this->translate('Create a New User Group Backend') ,
+ 'usergroupbackend/create',
+ null,
+ array(
+ 'class' => 'button-link',
+ 'data-base-target' => '_next',
+ 'icon' => 'plus',
+ 'title' => $this->translate('Create a new user group backend')
+ )
+ ) ?>
+
+
+
+
+ = $this->translate('Backend') ?> |
+ |
+
+
+
+ $config):
+ $type = $config->get('backend');
+?>
+
+
+ = $this->qlink(
+ $backendName,
+ 'usergroupbackend/edit',
+ array('backend' => $backendName),
+ array(
+ 'icon' => $type === 'external' ? 'magic' : ($type === 'ldap' || $type === 'msldap' ? 'sitemap' : 'database'),
+ 'title' => sprintf($this->translate('Edit user group backend %s'), $backendName)
+ )
+ ); ?>
+ |
+
+ = $this->qlink(
+ null,
+ 'usergroupbackend/remove',
+ array('backend' => $backendName),
+ array(
+ 'class' => 'action-link',
+ 'icon' => 'cancel',
+ 'title' => sprintf($this->translate('Remove user group backend %s'), $backendName)
+ )
+ ) ?>
+ |
+
+
+
+
diff --git a/application/views/scripts/usergroupbackend/list.phtml b/application/views/scripts/usergroupbackend/list.phtml
deleted file mode 100644
index 5ce1df90f..000000000
--- a/application/views/scripts/usergroupbackend/list.phtml
+++ /dev/null
@@ -1,56 +0,0 @@
-
- = $tabs ?>
-
-
- = $this->qlink(
- $this->translate('Create a New User Group Backend') ,
- 'usergroupbackend/create',
- null,
- array(
- 'class' => 'button-link',
- 'data-base-target' => '_next',
- 'icon' => 'plus',
- 'title' => $this->translate('Create a new user group backend')
- )
- ) ?>
-
-
-
-
- = $this->translate('Backend') ?> |
- |
-
-
-
- $config):
- $type = $config->get('backend');
-?>
-
-
- = $this->qlink(
- $backendName,
- 'usergroupbackend/edit',
- array('backend' => $backendName),
- array(
- 'icon' => $type === 'external' ? 'magic' : ($type === 'ldap' || $type === 'msldap' ? 'sitemap' : 'database'),
- 'title' => sprintf($this->translate('Edit user group backend %s'), $backendName)
- )
- ); ?>
- |
-
- = $this->qlink(
- null,
- 'usergroupbackend/remove',
- array('backend' => $backendName),
- array(
- 'class' => 'action-link',
- 'icon' => 'cancel',
- 'title' => sprintf($this->translate('Remove user group backend %s'), $backendName)
- )
- ) ?>
- |
-
-
-
-
-
diff --git a/library/Icinga/Application/Web.php b/library/Icinga/Application/Web.php
index 02f0aa9a5..d4cb9cecc 100644
--- a/library/Icinga/Application/Web.php
+++ b/library/Icinga/Application/Web.php
@@ -321,13 +321,7 @@ class Web extends EmbeddedWeb
'priority' => 810
),
'authentication' => array(
- 'label' => t('Authentication'),
- 'url' => 'config/userbackend',
- 'permission' => 'config/application/*',
- 'priority' => 820
- ),
- 'authorization' => array(
- 'label' => t('Authorization'),
+ 'label' => t('Authentication'),
'permission' => 'config/authentication/*',
'priority' => 830,
'url' => 'role/list'