Group assign requires object.groups update too (for apply rules).

Refs #6105
This commit is contained in:
Michael Friedrich 2014-05-01 23:53:38 +02:00
parent 01a0496988
commit b268e7d32d
3 changed files with 9 additions and 0 deletions

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}