A federal judge has thrown out a lawsuit filed against Detroit by a former top city attorney who lost her job after describing a court as a “ghetto court.”

U.S. District Judge Arthur J. Tarnow on Thursday agreed with the city’s claim that Kathleen Leavey’s comment a year ago was made in her role as interim head of Detroit’s law department and she had no free-speech protection.