aquinas ethicus: or, the moral teaching of st. thomas.
p. 52
be done in course of justice, either as a punishment, or as a precaution for the avoidance of some evil.
§ 1. A man who abuses the power given him, deserves to lose it; and therefore the man who has sinfully abused the free use of his limbs, is a suitable subject for imprisonment.
§ 3. It is lawful for any one to hold back a man for a time from doing there and then an unlawful act; as when one holds back another from casting himself headlong, or from committing assault. But absolutely to lock a man up, or put him in fetters, belongs to him alone who has general control over the life and actions of another: because thereby the party is hindered, not only from doing evil, but also from doing good.