mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-04-08 17:15:08 +02:00
UserController: Apply permission config/application/users/add
refs #8826
This commit is contained in:
parent
2cbea558ef
commit
88ba718ffb
@ -159,6 +159,7 @@ class UserController extends AuthBackendController
|
||||
*/
|
||||
public function addAction()
|
||||
{
|
||||
$this->assertPermission('config/application/users/add');
|
||||
$backend = $this->getUserBackend($this->params->getRequired('backend'), 'Icinga\Data\Extensible');
|
||||
$form = new UserForm();
|
||||
$form->setRedirectUrl(Url::fromPath('user/list', array('backend' => $backend->getName())));
|
||||
|
@ -22,8 +22,8 @@ if ($backend === null) {
|
||||
echo $this->translate('No backend found which is able to list users') . '</div>';
|
||||
return;
|
||||
} else {
|
||||
$extensible = $backend instanceof Extensible;
|
||||
$reducible = $backend instanceof Reducible;
|
||||
$extensible = $this->hasPermission('config/application/users/add') && $backend instanceof Extensible;
|
||||
}
|
||||
|
||||
if (count($users) > 0): ?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user