mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-23 22:04:25 +02:00
monitoring/security: Hide delete downtime action in the downtimes overview if user lacks the respective permission
This commit is contained in:
parent
5967d5fe04
commit
ac5ac10feb
@ -306,7 +306,10 @@ class Monitoring_ListController extends Controller
|
|||||||
));
|
));
|
||||||
|
|
||||||
$this->view->downtimes = $query->paginate();
|
$this->view->downtimes = $query->paginate();
|
||||||
$this->view->delDowntimeForm = new DeleteDowntimeCommandForm();
|
|
||||||
|
if ($this->Auth()->hasPermission('monitoring/command/downtime/delete')) {
|
||||||
|
$this->view->delDowntimeForm = new DeleteDowntimeCommandForm();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -114,6 +114,7 @@ use Icinga\Module\Monitoring\Object\Service;
|
|||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
</small>
|
</small>
|
||||||
</td>
|
</td>
|
||||||
|
<?php if (isset($delDowntimeForm)): // Form is unset if the current user lacks the respective permission ?>
|
||||||
<td style="width: 2em" data-base-target="self">
|
<td style="width: 2em" data-base-target="self">
|
||||||
<?php
|
<?php
|
||||||
$delDowntimeForm = clone $delDowntimeForm;
|
$delDowntimeForm = clone $delDowntimeForm;
|
||||||
@ -126,6 +127,7 @@ use Icinga\Module\Monitoring\Object\Service;
|
|||||||
echo $delDowntimeForm;
|
echo $delDowntimeForm;
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
|
<?php endif ?>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endforeach ?>
|
<?php endforeach ?>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user