Restraining residents with legal principle

evaluate the issue in regards restraining the residents for long time using legal principle, ethical principle, code of ethics, code of conduct, standard practice?