mirror of https://github.com/Icinga/icinga2.git
parent
2280e20995
commit
9a6a84d9d9
|
@ -49,7 +49,7 @@ bool HostGroup::EvaluateObjectRule(const Host::Ptr& host, const ConfigItem::Ptr&
|
||||||
group->GetScope()->CopyTo(frame.Locals);
|
group->GetScope()->CopyTo(frame.Locals);
|
||||||
frame.Locals->Set("host", host);
|
frame.Locals->Set("host", host);
|
||||||
|
|
||||||
if (!group->GetFilter()->Evaluate(frame))
|
if (!group->GetFilter()->Evaluate(frame).ToBool())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
Log(LogDebug, "HostGroup")
|
Log(LogDebug, "HostGroup")
|
||||||
|
|
|
@ -52,7 +52,7 @@ bool ServiceGroup::EvaluateObjectRule(const Service::Ptr& service, const ConfigI
|
||||||
frame.Locals->Set("host", host);
|
frame.Locals->Set("host", host);
|
||||||
frame.Locals->Set("service", service);
|
frame.Locals->Set("service", service);
|
||||||
|
|
||||||
if (!group->GetFilter()->Evaluate(frame))
|
if (!group->GetFilter()->Evaluate(frame).ToBool())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
Log(LogDebug, "ServiceGroup")
|
Log(LogDebug, "ServiceGroup")
|
||||||
|
|
|
@ -49,7 +49,7 @@ bool UserGroup::EvaluateObjectRule(const User::Ptr& user, const ConfigItem::Ptr&
|
||||||
group->GetScope()->CopyTo(frame.Locals);
|
group->GetScope()->CopyTo(frame.Locals);
|
||||||
frame.Locals->Set("user", user);
|
frame.Locals->Set("user", user);
|
||||||
|
|
||||||
if (!group->GetFilter()->Evaluate(frame))
|
if (!group->GetFilter()->Evaluate(frame).ToBool())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
Log(LogDebug, "UserGroup")
|
Log(LogDebug, "UserGroup")
|
||||||
|
|
Loading…
Reference in New Issue