def visible_to_user(self, user):
        """Get a list of hosts available to a given user.

        Same logic as Announcements and Events.

        """

        return Host.objects.filter(Q(groups_visible__in=user.groups.all()) | Q(groups_visible__isnull=True)).distinct()
Get a list of hosts available to a given user.

        Same logic as Announcements and Events.