What is the meaning of [don’t let the fox guard the hen house]

Do not put somebody in a position where he or she will be tempted to wrongdoing.