MCPcopy Create free account
hub / github.com/Icinga/icinga2 / CalculateConfigHash

Method CalculateConfigHash

lib/db_ido/userdbobject.cpp:146–162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144}
145
146String UserDbObject::CalculateConfigHash(const Dictionary::Ptr& configFields) const
147{
148 String hashData = DbObject::CalculateConfigHash(configFields);
149
150 User::Ptr user = static_pointer_cast<User>(GetObject());
151
152 Array::Ptr groups = user->GetGroups();
153
154 if (groups) {
155 groups = groups->ShallowClone();
156 ObjectLock oLock (groups);
157 std::sort(groups->Begin(), groups->End());
158 hashData += DbObject::HashValue(groups);
159 }
160
161 return SHA256(hashData);
162}

Callers

nothing calls this directly

Calls 4

SHA256Function · 0.85
ShallowCloneMethod · 0.45
BeginMethod · 0.45
EndMethod · 0.45

Tested by

no test coverage detected