A judge ruled that the Cabell County school system did not violate the woman’s First Amendment rights.

HUNTINGTON, W.Va. (AP) — A federal judge has dismissed a lawsuit filed by a high school teacher in West Virginia who was fired in 2017 for a series of social media posts that ridiculed Black people, Muslims and former President Barack Obama.

U.S. District Judge Robert C. Chambers ruled that the Cabell County school system did not violate the woman’s First Amendment rights, The Herald-Dispatch reported.

READ MORE: Pittsburgh Public Schools Announces 'Summer B.O.O.S.T.' Program To Address Pandemic Learning Gap

Former Huntington High School teacher Mary Durstein argued that a law requiring teachers to have a professional relationship with students even outside the classroom and allowing the superintendent to revoke or suspend a teaching certificate for “immorality” was an overly broad and unconstitutional restriction of her free speech rights.

READ MORE: Westmoreland County Doctor Explains What Happens To Unused Coronavirus Vaccine Doses

The judge ruled Monday that Durstein failed to show that the law targets freedom of expression.

“We welcome this ruling as a reaffirmation that those who apparently hold biased views of others —while having the right to express even those bigoted views — should not be teaching our nation’s children,” Council on American-Islamic Relations spokesman Ibrahim Hooper said Tuesday.

MORE NEWS: Busing Woes Continue For Hundreds Of Pittsburgh Public Schools Students

(Copyright 2021 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.)