Downtime#HasValidConfigOwner(): respect Downtime#authoritative_zone

refs #6542
This commit is contained in:
Alexander A. Klimov 2018-12-04 17:45:54 +01:00
parent 5431eae116
commit c98d6a5254

View File

@ -211,7 +211,7 @@ bool Downtime::IsExpired() const
bool Downtime::HasValidConfigOwner() const bool Downtime::HasValidConfigOwner() const
{ {
String configOwner = GetConfigOwner(); String configOwner = GetConfigOwner();
return configOwner.IsEmpty() || GetObject<ScheduledDowntime>(configOwner); return configOwner.IsEmpty() || Zone::GetByName(GetAuthoritativeZone()) != Zone::GetLocalZone() || GetObject<ScheduledDowntime>(configOwner);
} }
int Downtime::GetNextDowntimeID() int Downtime::GetNextDowntimeID()