mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-29 16:54:04 +02:00
Permissions: Show restrictions in the permissions list
This commit is contained in:
parent
e48935f487
commit
bf33c9c13b
@ -12,6 +12,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th><?= $this->translate('Name') ?></th>
|
<th><?= $this->translate('Name') ?></th>
|
||||||
<th><?= $this->translate('Permissions') ?></th>
|
<th><?= $this->translate('Permissions') ?></th>
|
||||||
|
<th><?= $this->translate('Restrictions') ?></th>
|
||||||
<th><?= $this->translate('Users') ?></th>
|
<th><?= $this->translate('Users') ?></th>
|
||||||
<th><?= $this->translate('Groups') ?></th>
|
<th><?= $this->translate('Groups') ?></th>
|
||||||
</tr>
|
</tr>
|
||||||
@ -25,7 +26,28 @@
|
|||||||
<a href="<?= $this->url('permissions/update', array('role' => $name)) ?>"></a>
|
<a href="<?= $this->url('permissions/update', array('role' => $name)) ?>"></a>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td><?= $this->escape($role->permissions) ?></td>
|
<td><?= $this->escape($role->permissions, 0, 50) ?></td>
|
||||||
|
<td>
|
||||||
|
<?php
|
||||||
|
// TODO(el): $role->without(...) or $role->shift(...) would be nice!
|
||||||
|
$restrictions = $role;
|
||||||
|
unset($restrictions['users']);
|
||||||
|
unset($restrictions['groups']);
|
||||||
|
unset($restrictions['permissions']);
|
||||||
|
?>
|
||||||
|
<?php if (! empty($restrictions)): ?>
|
||||||
|
<table>
|
||||||
|
<tbody>
|
||||||
|
<?php foreach ($restrictions as $restrictionName => $restriction): ?>
|
||||||
|
<tr>
|
||||||
|
<th><?= $this->escape($restrictionName) ?></th>
|
||||||
|
<td><?= $this->escape($restriction) ?></td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach ?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<?php endif ?>
|
||||||
|
</td>
|
||||||
<td><?= $this->escape($role->users) ?></td>
|
<td><?= $this->escape($role->users) ?></td>
|
||||||
<td><?= $this->escape($role->groups) ?></td>
|
<td><?= $this->escape($role->groups) ?></td>
|
||||||
<td>
|
<td>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user