ProcessCheckResultForm: Skip objects with passive checks disabled

Icinga won't accept check results for such.
This commit is contained in:
Johannes Meyer 2021-04-14 10:56:54 +02:00
parent 943fb65b04
commit d4136d9d83

View file

@ -103,7 +103,10 @@ class ProcessCheckResultForm extends CommandForm
protected function getCommand(Model $object)
{
if (! $this->isGrantedOn('icingadb/command/process-check-result', $object)) {
if (
! $object->passive_checks_enabled
|| ! $this->isGrantedOn('icingadb/command/process-check-result', $object)
) {
return null;
}