From identity checks to legal aid, here’s what the law says about police powers and citizens’ rights during protests