mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-26 07:14:35 +02:00
UserController: Apply permission config/application/users/remove
refs #8826
This commit is contained in:
parent
01b790cf18
commit
0e37aad6ce
@ -198,6 +198,7 @@ class UserController extends AuthBackendController
|
|||||||
*/
|
*/
|
||||||
public function removeAction()
|
public function removeAction()
|
||||||
{
|
{
|
||||||
|
$this->assertPermission('config/application/users/remove');
|
||||||
$userName = $this->params->getRequired('user');
|
$userName = $this->params->getRequired('user');
|
||||||
$backend = $this->getUserBackend($this->params->getRequired('backend'), 'Icinga\Data\Reducible');
|
$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>';
|
echo $this->translate('No backend found which is able to list users') . '</div>';
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
$reducible = $backend instanceof Reducible;
|
|
||||||
$extensible = $this->hasPermission('config/application/users/add') && $backend instanceof Extensible;
|
$extensible = $this->hasPermission('config/application/users/add') && $backend instanceof Extensible;
|
||||||
|
$reducible = $this->hasPermission('config/application/users/remove') && $backend instanceof Reducible;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count($users) > 0): ?>
|
if (count($users) > 0): ?>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user