Minors don't necessarily have the full array of rights that people of majority age have.  Schools for a very long time operated <i>in loco parentis</i> -- essentially possessing the same ability to restrict a minor's actions as a parent would have.  The doctrine of <i>in loco parentis</i> has been mostly dismantled since the 1960s, but not wholly.