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

Method GetUserGroups

lib/icinga/notification.cpp:191–211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

189}
190
191std::set<UserGroup::Ptr> Notification::GetUserGroups() const
192{
193 std::set<UserGroup::Ptr> result;
194
195 Array::Ptr groups = GetUserGroupsRaw();
196
197 if (groups) {
198 ObjectLock olock(groups);
199
200 for (String name : groups) {
201 UserGroup::Ptr ug = UserGroup::GetByName(name);
202
203 if (!ug)
204 continue;
205
206 result.insert(ug);
207 }
208 }
209
210 return result;
211}
212
213TimePeriod::Ptr Notification::GetPeriod() const
214{

Calls 1

insertMethod · 0.45

Tested by

no test coverage detected