UserController: Apply permission config/application/users/remove

refs 
This commit is contained in:
Johannes Meyer 2015-05-27 10:29:21 +02:00
parent 01b790cf18
commit 0e37aad6ce
2 changed files with 2 additions and 1 deletions
application
controllers
views/scripts/user

@ -198,6 +198,7 @@ class UserController extends AuthBackendController
*/
public function removeAction()
{
$this->assertPermission('config/application/users/remove');
$userName = $this->params->getRequired('user');
$backend = $this->getUserBackend($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 users') . '</div>';
return;
} else {
$reducible = $backend instanceof Reducible;
$extensible = $this->hasPermission('config/application/users/add') && $backend instanceof Extensible;
$reducible = $this->hasPermission('config/application/users/remove') && $backend instanceof Reducible;
}
if (count($users) > 0): ?>