Only voters who are registered members of political parties may vote for respective party candidates for an office in a primary election.
However, there are times when all registered voters can vote in a primary election, regardless of which major or minor political party they are registered or even if they are registered without a specific party affiliation:
If all the candidates for an office have the same party affiliation and the winner of the primary election will not face any opposition in the general election (i.e. no write-in candidates have qualified) then a Universal Primary is held, and all registered voters can vote for any of the candidates for that office in the primary election.
If races for nonpartisan (i.e., free from party affiliation) judicial and school board offices, nonpartisan special districts or local referendum questions are on the primary election ballot, then all registered voters, including those without party affiliation are entitled to vote those races on the ballot.
At a general election, all registered voters receive the same ballot and may vote for any candidate or question on the ballot. If there are write-in candidates who have qualified for a particular office, a space will be left on the ballot where their name can be written.