def METHOD_NAME(self):
    params = request.get_json(silent=True) or {}
    gid = params.get("gid")
    uid = params.get("uid")
    user = get_object_or_404(User, id=uid)
    group = get_object_or_404(Group, id=gid)
    is_admin = current_user.has_role("admin")
    is_group_admin = current_user in group.admins and group.enabled
    if is_admin or is_group_admin:
        group.update(pull__members=user.id)
        return render(group.reload())
    abort(403)