GroupController: Apply permission config/application/groups/remove
refs #8826
This commit is contained in:
parent
b58cd4747c
commit
0c9bac0686
|
@ -130,7 +130,7 @@ class GroupController extends AuthBackendController
|
|||
$this->view->members = $members;
|
||||
$this->createShowTabs($backend->getName(), $groupName)->activate('group/show');
|
||||
|
||||
if ($backend instanceof Reducible) {
|
||||
if ($this->hasPermission('config/application/groups/remove') && $backend instanceof Reducible) {
|
||||
$removeForm = new Form();
|
||||
$removeForm->setUidDisabled();
|
||||
$removeForm->setAction(
|
||||
|
@ -206,6 +206,7 @@ class GroupController extends AuthBackendController
|
|||
*/
|
||||
public function removeAction()
|
||||
{
|
||||
$this->assertPermission('config/application/groups/remove');
|
||||
$groupName = $this->params->getRequired('group');
|
||||
$backend = $this->getUserGroupBackend($this->params->getRequired('backend'), 'Icinga\Data\Reducible');
|
||||
|
||||
|
|
|
@ -22,8 +22,8 @@ if ($backend === null) {
|
|||
echo $this->translate('No backend found which is able to list groups') . '</div>';
|
||||
return;
|
||||
} else {
|
||||
$reducible = $backend instanceof Reducible;
|
||||
$extensible = $this->hasPermission('config/application/groups/add') && $backend instanceof Extensible;
|
||||
$reducible = $this->hasPermission('config/application/groups/remove') && $backend instanceof Reducible;
|
||||
}
|
||||
|
||||
if (count($groups) > 0): ?>
|
||||
|
|
Loading…
Reference in New Issue