Rename permission config/application/groups* to config/authentication/...
refs #8826
This commit is contained in:
parent
a558f2873a
commit
3fffd90135
|
@ -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');
|
||||
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -22,8 +22,8 @@ if ($backend === null) {
|
|||
echo $this->translate('No backend found which is able to list groups') . '</div>';
|
||||
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): ?>
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -54,7 +54,7 @@ if ($this->hasPermission('config/authentication/users/edit') && $backend instanc
|
|||
<?php foreach ($memberships as $membership): ?>
|
||||
<tr>
|
||||
<td class="membership-group">
|
||||
<?php if ($this->hasPermission('config/application/groups/show') && $membership->backend instanceof Selectable): ?>
|
||||
<?php if ($this->hasPermission('config/authentication/groups/show') && $membership->backend instanceof Selectable): ?>
|
||||
<?= $this->qlink($membership->group_name, 'group/show', array(
|
||||
'backend' => $membership->backend->getName(),
|
||||
'group' => $membership->group_name
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue