Downtime#HasValidConfigOwner(): respect Downtime#authoritative_zone 6821/head
authorAlexander A. Klimov <alexander.klimov@icinga.com>
Tue, 4 Dec 2018 16:45:54 +0000 (17:45 +0100)
committerAlexander A. Klimov <alexander.klimov@icinga.com>
Mon, 17 Dec 2018 14:54:31 +0000 (15:54 +0100)
refs #6542

lib/icinga/downtime.cpp

index 47ef789cba653c002d01d29fbd9c974421be2585..549b721c1678cf3f57932923de5dce0fe6659abe 100644 (file)
@@ -211,7 +211,7 @@ bool Downtime::IsExpired() const
 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()