Julian Brost cc48c924ae Load Notification objects after User and UserGroup
Notification objects can refer User and Group objects similar to how they can
refer Host and Service objects, so that dependency feels quite natural. Note
that for evaluating most configuration, this order doesn't really matter, the
configuration will successfully evaluate in either case, the difference can be
noticed mainly in more advanced configurations, for example when dynamically
assigning user based on their groups. When accessing user objects from the
Notification object definition (like in the following example), without this
change, only groups configured directly in groups attribute of User objects are
visible and those added via assign clauses in UserGroup objects are missing.
With this commit, these are also visible.

    apply Notification "n" to Host {
        for (var u in get_objects(User)) {
            log(u.name + " -> " + Json.encode(u.groups))
        }

        # [...]
    }
2025-04-29 12:14:46 +02:00
..
2023-05-17 18:05:13 +02:00
2021-02-03 09:54:57 +01:00
2022-05-11 17:50:12 +02:00
2022-03-24 16:42:18 +01:00
2023-05-17 18:05:13 +02:00
2023-02-06 11:25:25 +01:00
2023-02-06 11:25:25 +01:00
2021-02-03 09:54:57 +01:00
2021-02-03 09:54:57 +01:00
2021-02-03 09:54:57 +01:00
2023-05-17 18:05:13 +02:00