Skip to content

Commit

Permalink
Fix missing IDO updates for groups
Browse files Browse the repository at this point in the history
fixes #12527
  • Loading branch information
gunnarbeutner committed Aug 24, 2016
1 parent 614e0ac commit bc88f81
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/db_ido/hostdbobject.cpp
Expand Up @@ -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 */
Expand Down
5 changes: 5 additions & 0 deletions lib/db_ido/servicedbobject.cpp
Expand Up @@ -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 */
Expand Down
14 changes: 14 additions & 0 deletions lib/db_ido/userdbobject.cpp
Expand Up @@ -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;
}
2 changes: 2 additions & 0 deletions lib/db_ido/userdbobject.hpp
Expand Up @@ -43,6 +43,8 @@ class UserDbObject : public DbObject
virtual Dictionary::Ptr GetStatusFields(void) const override;

virtual void OnConfigUpdateHeavy(void) override;

virtual String CalculateConfigHash(const Dictionary::Ptr& configFields) const;
};

}
Expand Down

0 comments on commit bc88f81

Please sign in to comment.