GroupController: Apply permission config/application/groups/remove

refs #8826
This commit is contained in:
Johannes Meyer 2015-05-27 10:33:20 +02:00
parent b58cd4747c
commit 0c9bac0686
2 changed files with 3 additions and 2 deletions

View File

@ -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');

View File

@ -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): ?>