I found the article Dean cited.
The Article is from a law firm but does not go into specifics about the applicable law. They also don't specify or cite any portion of the applicable statutes.
A
different article from a different law firm specifies that an Association can deny sales if the CC&Rs specify it and lists criteria.
Per that article:
There are four legal reasons associations can deny potential buyers or renters:
1. Violation of a rule outlined in the governing documents;
2. A propensity to violate rules and regulations in the past (e.g., an applicant, who lived in the association as a tenant and now wants to buy a property, is known to have violated the community’s rules);
3. Material misrepresentation on the potential buyer or renter’s applications (e.g., if the association asks about the applicant’s criminal history but the applicants lies, the association has legal grounds to deny the application); and
4. The prospective buyer or renter has been convicted of a felony for violent crimes or crimes involving property, and their civil rights have not been restored.