(a) A person must be affiliated with a political party to be eligible:
(1) to serve as a delegate to or otherwise participate in a convention held by the party under this code;
(2) to be elected as a member of or be appointed to fill a vacancy on a state executive committee;
(3) to be appointed to fill a vacancy on a county executive committee; or
(4) for any other purpose within the party as adopted by state party rules.
(b) The affiliation requirement prescribed by Subsections (a)(2) and (3) applies only during a voting year in which the general election for state and county officers is held and does not apply until:
(1) general primary election day, for a party holding a primary election; or
(2) the date of the precinct conventions held under this title, for a party nominating by convention.