def queryset(self, request):
        """Limit user groups to those you manage.

        The superuser can edit all user groups, of course.

        """
        qs = super(UserGroupAdmin, self).queryset(request)
        if request.user.is_superuser:
            return qs
        return qs.filter(id__in=request.user.managed_user_groups.all())