mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-25 23:04:51 +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()
|
public function addAction()
|
||||||
{
|
{
|
||||||
|
$this->assertPermission('config/application/users/add');
|
||||||
$backend = $this->getUserBackend($this->params->getRequired('backend'), 'Icinga\Data\Extensible');
|
$backend = $this->getUserBackend($this->params->getRequired('backend'), 'Icinga\Data\Extensible');
|
||||||
$form = new UserForm();
|
$form = new UserForm();
|
||||||
$form->setRedirectUrl(Url::fromPath('user/list', array('backend' => $backend->getName())));
|
$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>';
|
echo $this->translate('No backend found which is able to list users') . '</div>';
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
$extensible = $backend instanceof Extensible;
|
|
||||||
$reducible = $backend instanceof Reducible;
|
$reducible = $backend instanceof Reducible;
|
||||||
|
$extensible = $this->hasPermission('config/application/users/add') && $backend instanceof Extensible;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count($users) > 0): ?>
|
if (count($users) > 0): ?>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user