Freemasons should obviously do what is morally correct. Following the letter of the law rather than the spirit of it is usually the weasel's way of getting around doing the right thing.
That said, back in 2000, Brother Kevin Francart did extensive research on federal and state laws, as regards applying discrimination laws, statutes and decisions to private clubs (especially fraternal organizations). His study, NO DOGS ALLOWED appeared in the Thomas M. Cooley Law Review. The arguments as to whether such laws can be applied to force fraternal groups, like the Freemasons, to admit people their members want kept out center around the right to freely associate or NOT to associate with others, as well as whether an organization is a public accommodation.
See NO DOGS ALLOWED: FREEDOM OF ASSOCIATION v. FORCED INCLUSION. ANTI-DISCRIMINATION STATUTES AND THEIR APPLICABILITY TO PRIVATE ORGANIZATIONS
My purpose in posting this information has to do with uninformed sabre-rattling about how the law might or might not be used to compel grand lodges that are reputedly racist in practice to knuckle under to civil rights regulations. The truth is, they probably can't.
All of this fails to recognize that Freemasons are supposed to regard our brothers on the level. That's not supposed to be a theory. And it isn't just lofty sounding platitudes. We shouldn't even be having a conversation about how to compel grand lodges to end institutional racism, because as Masons, it shouldn't have existed in the first place. And it sure as hell shouldn't exist anywhere today.