Restaurants (and other businesses) sometimes post signs stating that they reserve the right to refuse service to anyone. But Title VII of the Civil Rights Act of 1964 prohibits discrimination based on race, color, sex, religion, or national origin and the Americans with Disabilities Act (ADA) prohibits discrimination by places of public accommodation (including restaurants) on the basis of disability.
In addition to these federal statutes that prohibit discrimination against protected classes of persons, some states and cities have laws that prohibit discrimination based on other classifications—such as sexual orientation.
Restaurants have the right to exclude or refuse to serve persons that fail to meet a dress code, for example (“No shoes, no shirt, no service”) or are disruptive, for example, but they do not have the right to exclude or discriminate against persons based on being part of a class or group of persons protected by federal law or by state or local laws.
In California, while restaurants and other businesses may post signs reserving the right to refuse service to anyone, they must comply with both federal and state anti-discrimination laws. Under Title VII of the Civil Rights Act of 1964, discrimination based on race, color, sex, religion, or national origin is prohibited. The Americans with Disabilities Act (ADA) further prohibits discrimination against individuals with disabilities in places of public accommodation, which includes restaurants. California law also extends these protections to include sexual orientation, gender identity, and other classifications under the Unruh Civil Rights Act and the California Fair Employment and Housing Act (FEHA). While businesses can enforce dress codes or refuse service to individuals who are disruptive or fail to meet basic hygiene requirements (e.g., 'No shoes, no shirt, no service'), they cannot refuse service based on a customer's membership in a protected class.