Citizens of the state shall be entitled to vote at all elections held within the precincts of the counties and municipalities in which they respectively reside. But no person who has not been registered as a voter as required by law, or who is a minor, or who has been declared mentally incompetent by a court of competent jurisdiction, or who is under conviction of treason, felony or bribery in an election, or who is not a bona fide resident of the state, county or municipality in which he or she offers to vote, shall be permitted to vote at such election while such disability continues, unless otherwise specifically provided by federal or state code. Subject to the qualifications otherwise prescribed in this section, however, a minor shall be permitted to vote only in a primary election if he or she will have reached the age of eighteen years on the date of the general election next to be held after such primary election.