mirror of https://github.com/Icinga/icinga2.git
parent
22c21ebd61
commit
9ae1f1abee
|
@ -642,13 +642,12 @@ void ApiListener::SyncRelayMessage(const MessageOrigin::Ptr& origin,
|
|||
|
||||
Zone::Ptr target_zone = endpoint->GetZone();
|
||||
|
||||
allZones.insert(target_zone);
|
||||
|
||||
/* only relay messages to zones which have access to the object */
|
||||
if (!target_zone->CanAccessObject(secobj)) {
|
||||
finishedLogZones.insert(target_zone);
|
||||
if (!target_zone->CanAccessObject(secobj))
|
||||
continue;
|
||||
}
|
||||
|
||||
allZones.insert(target_zone);
|
||||
|
||||
/* don't relay messages to disconnected endpoints */
|
||||
if (!endpoint->GetConnected()) {
|
||||
|
|
|
@ -63,7 +63,7 @@ bool Zone::CanAccessObject(const ConfigObject::Ptr& object)
|
|||
{
|
||||
Zone::Ptr object_zone;
|
||||
|
||||
if (dynamic_pointer_cast<Zone>(object))
|
||||
if (object->GetReflectionType() == Zone::TypeInstance)
|
||||
object_zone = static_pointer_cast<Zone>(object);
|
||||
else
|
||||
object_zone = static_pointer_cast<Zone>(object->GetZone());
|
||||
|
|
Loading…
Reference in New Issue