Kant argues that we should never use people as a means:
unless we are certain that doing so will lead to the greatest overall happiness.
unless we can do so without their knowledge.
unless they are guilty of breaking the law.
unless we are respecting their rational autonomy at the same time.