]> granicus.if.org Git - icinga2/commitdiff
Downtime#HasValidConfigOwner(): respect Downtime#authoritative_zone
authorAlexander A. Klimov <alexander.klimov@icinga.com>
Tue, 4 Dec 2018 16:45:54 +0000 (17:45 +0100)
committerMichael Friedrich <michael.friedrich@icinga.com>
Mon, 11 Feb 2019 12:14:46 +0000 (13:14 +0100)
refs #6542

(cherry picked from commit c98d6a52545bf0e10b9b0d644b0d15813ab7de48)

lib/icinga/downtime.cpp

index 11b38d416a3e9ee41baaaa49c1efe24254dec448..d9b24a3d3c11c07ee5abba2a59f391feeb461830 100644 (file)
@@ -215,7 +215,7 @@ bool Downtime::HasValidConfigOwner() const
        }
 
        String configOwner = GetConfigOwner();
-       return configOwner.IsEmpty() || GetObject<ScheduledDowntime>(configOwner);
+       return configOwner.IsEmpty() || Zone::GetByName(GetAuthoritativeZone()) != Zone::GetLocalZone() || GetObject<ScheduledDowntime>(configOwner);
 }
 
 int Downtime::GetNextDowntimeID()