Filing writ petitions for violation of legal rights