Fix missing IDO updates for groups

fixes #12527
This commit is contained in:
Gunnar Beutner 2016-08-24 11:35:12 +02:00
parent deb938d412
commit c981426cfb
4 changed files with 26 additions and 0 deletions

View File

@ -397,6 +397,11 @@ String HostDbObject::CalculateConfigHash(const Dictionary::Ptr& configFields) co
Host::Ptr host = static_pointer_cast<Host>(GetObject());
Array::Ptr groups = host->GetGroups();
if (groups)
hashData += DbObject::HashValue(groups);
Array::Ptr parents = new Array();
/* parents */

View File

@ -357,6 +357,11 @@ String ServiceDbObject::CalculateConfigHash(const Dictionary::Ptr& configFields)
Service::Ptr service = static_pointer_cast<Service>(GetObject());
Array::Ptr groups = service->GetGroups();
if (groups)
hashData += DbObject::HashValue(groups);
Array::Ptr dependencies = new Array();
/* dependencies */

View File

@ -163,3 +163,17 @@ void UserDbObject::OnConfigUpdateHeavy(void)
DbObject::OnMultipleQueries(queries);
}
String UserDbObject::CalculateConfigHash(const Dictionary::Ptr& configFields) const
{
String hashData = DbObject::CalculateConfigHash(configFields);
User::Ptr user = static_pointer_cast<User>(GetObject());
Array::Ptr groups = user->GetGroups();
if (groups)
hashData += DbObject::HashValue(groups);
return hashData;
}

View File

@ -43,6 +43,8 @@ protected:
virtual Dictionary::Ptr GetStatusFields(void) const override;
virtual void OnConfigUpdateHeavy(void) override;
virtual String CalculateConfigHash(const Dictionary::Ptr& configFields) const;
};
}