'Returns the groups that user is a member of.  If the user is a superuser, all groups are returned.'

@classmethod
def groups_for_user(cls, user):

    if user.is_authenticated():
        if user.is_superuser:
            return cls.objects.all()
        return cls.objects.filter(groupmember__user=user)
    return []
