Bill of Rights
Section 1. No member of this state shall be disfranchised, or deprived of any of the rights or privileges secured to any citizen thereof, unless by the law of the land, or the judgment of his or her peers, except that the legislature may provide that there shall be no primary election held to nominate candidates for public office or to elect persons to party positions for any political party or parties in any unit of representation of the state from which such candidates or persons are nominated or elected whenever there is no contest or contests for such nominations or election as may be prescribed by general law.
State of New York Election Law (2013)
(f) Notice that political party enrollment is optional but that, in order to vote in a primary election of a political party, a voter must enroll in that political party, unless state party rules allow otherwise.