CheckNowCommandForm: Ignore objects which have no active checks

refs #3665
This commit is contained in:
Johannes Meyer 2019-02-01 14:01:20 +01:00
parent 164555760b
commit c2fc370273
1 changed files with 6 additions and 0 deletions

View File

@ -58,6 +58,12 @@ class CheckNowCommandForm extends ObjectsCommandForm
{
foreach ($this->objects as $object) {
/** @var \Icinga\Module\Monitoring\Object\MonitoredObject $object */
if (! $object->active_checks_enabled
&& ! $this->Auth()->hasPermission('monitoring/command/schedule-check')
) {
continue;
}
if ($object->getType() === $object::TYPE_HOST) {
$check = new ScheduleHostCheckCommand();
} else {