mirror of https://github.com/Icinga/icinga2.git
Group assign requires object.groups update too (for apply rules).
Refs #6105
This commit is contained in:
parent
01a0496988
commit
b268e7d32d
|
@ -66,6 +66,9 @@ bool HostGroup::EvaluateObjectRule(const Host::Ptr host, const ObjectRule& rule)
|
|||
/* assign host group membership */
|
||||
group->ResolveGroupMembership(host, true);
|
||||
|
||||
/* update groups attribute for apply */
|
||||
host->AddGroup(group_name);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -70,6 +70,9 @@ bool ServiceGroup::EvaluateObjectRule(const Service::Ptr service, const ObjectRu
|
|||
/* assign service group membership */
|
||||
group->ResolveGroupMembership(service, true);
|
||||
|
||||
/* update groups attribute for apply */
|
||||
service->AddGroup(group_name);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -66,6 +66,9 @@ bool UserGroup::EvaluateObjectRule(const User::Ptr user, const ObjectRule& rule)
|
|||
/* assign user group membership */
|
||||
group->ResolveGroupMembership(user, true);
|
||||
|
||||
/* update groups attribute for apply */
|
||||
user->AddGroup(group_name);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue