UserController: Apply permission config/application/users/add

refs #8826
This commit is contained in:
Johannes Meyer 2015-05-27 10:26:43 +02:00
parent 2cbea558ef
commit 88ba718ffb
2 changed files with 2 additions and 1 deletions

View File

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

View File

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