= $this->translate('No roles found.') ?>
diff --git a/application/controllers/RoleController.php b/application/controllers/RoleController.php index 246d8900b..a65510471 100644 --- a/application/controllers/RoleController.php +++ b/application/controllers/RoleController.php @@ -3,7 +3,6 @@ namespace Icinga\Controllers; -use Icinga\Application\Config; use Icinga\Authentication\RolesConfig; use Icinga\Exception\NotFoundError; use Icinga\Forms\Security\RoleForm; @@ -32,7 +31,20 @@ class RoleController extends AuthBackendController { $this->assertPermission('config/authentication/roles/show'); $this->createListTabs()->activate('role/list'); - $this->view->roles = Config::app('roles', true); + $this->view->roles = (new RolesConfig()) + ->select(); + + $sortAndFilterColumns = [ + 'name' => $this->translate('Name'), + 'users' => $this->translate('Users'), + 'groups' => $this->translate('Groups'), + 'permissions' => $this->translate('Permissions') + ]; + + $this->setupFilterControl($this->view->roles, $sortAndFilterColumns, ['name']); + $this->setupLimitControl(); + $this->setupPaginationControl($this->view->roles); + $this->setupSortControl($sortAndFilterColumns, $this->view->roles, ['name']); } /** diff --git a/application/views/scripts/role/list.phtml b/application/views/scripts/role/list.phtml index 9d047b4d7..9045d0e3b 100644 --- a/application/views/scripts/role/list.phtml +++ b/application/views/scripts/role/list.phtml @@ -1,5 +1,11 @@ -
= $this->translate('No roles found.') ?>