Used in DB IDO and Livestatus. */
| 236 | |
| 237 | /* Used in DB IDO and Livestatus. */ |
| 238 | std::set<UserGroup::Ptr> CompatUtility::GetCheckableNotificationUserGroups(const Checkable::Ptr& checkable) |
| 239 | { |
| 240 | std::set<UserGroup::Ptr> usergroups; |
| 241 | /* Service -> Notifications -> UserGroups */ |
| 242 | for (const Notification::Ptr& notification : checkable->GetNotifications()) { |
| 243 | ObjectLock olock(notification); |
| 244 | |
| 245 | for (const UserGroup::Ptr& ug : notification->GetUserGroups()) { |
| 246 | usergroups.insert(ug); |
| 247 | } |
| 248 | } |
| 249 | |
| 250 | return usergroups; |
| 251 | } |
| 252 | |
| 253 | /* Used in DB IDO, Livestatus, CompatLogger, GelfWriter, IcingaDB. */ |
| 254 | String CompatUtility::GetCheckResultOutput(const CheckResult::Ptr& cr) |
nothing calls this directly
no test coverage detected