icingaweb2/application/views/scripts/security/index.phtml

43 lines
1.9 KiB
PHTML

<div class="content">
<div>
<h1><?= $this->translate('Permissions') ?></h1>
<?php /** @var \Icinga\Application\Config $permissions */ if ($permissions->isEmpty()): ?>
<?= $this->translate('No permissions found.') ?>
<?php else: ?>
<table class="action" data-base-target="_next">
<thead>
<tr>
<th><?= $this->translate('Name') ?></th>
<th><?= $this->translate('Permissions') ?></th>
<th><?= $this->translate('Users') ?></th>
<th><?= $this->translate('Groups') ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($permissions as $name => $permission): /** @var object $permission */ ?>
<tr>
<td>
<?= $this->escape($name) ?>
<div class="hidden">
<a href="<?= $this->url('security/update-permission', array('permission' => $name)) ?>"></a>
</div>
</td>
<td><?= $this->escape($permission->permissions) ?></td>
<td><?= $this->escape($permission->users) ?></td>
<td><?= $this->escape($permission->groups) ?></td>
<td>
<a href="<?= $this->url('security/remove-permission', array('permission' => $name)) ?>">
<?= $this->translate('Remove permission') ?>
</a>
</td>
</tr>
<?php endforeach ?>
</tbody>
</table>
<?php endif ?>
<a data-base-target="_next" href="<?= $this->href('security/new-permission') ?>">
<?= $this->translate('Grant Permissions') ?>
</a>
</div>
</div>