Courts have ruled and it relates to sexual relations and favoritism
Miller vs Department of Corrections in 2005 via California Supreme Court https://www.seyfarth.com/news-insights/california-supreme-co...
Broderick vs Ruder in 1988 in D.C court https://law.justia.com/cases/federal/district-courts/FSupp/6...
Those are just a sample. There are many
Here is a sample of policy https://www.eeoc.gov/laws/guidance/policy-guidance-employer-...