AuthBackendController: Only show tabs the user is permitted to view

refs #8826
This commit is contained in:
Johannes Meyer 2015-05-27 10:38:35 +02:00
parent d157dec13b
commit 8713f59e66

View File

@ -138,6 +138,8 @@ class AuthBackendController extends Controller
protected function createListTabs() protected function createListTabs()
{ {
$tabs = $this->getTabs(); $tabs = $this->getTabs();
if ($this->hasPermission('config/application/users/show')) {
$tabs->add( $tabs->add(
'user/list', 'user/list',
array( array(
@ -147,6 +149,9 @@ class AuthBackendController extends Controller
'url' => 'user/list' 'url' => 'user/list'
) )
); );
}
if ($this->hasPermission('config/application/groups/show')) {
$tabs->add( $tabs->add(
'group/list', 'group/list',
array( array(
@ -156,6 +161,7 @@ class AuthBackendController extends Controller
'url' => 'group/list' 'url' => 'group/list'
) )
); );
}
return $tabs; return $tabs;
} }