A judge in New York City has dismissed a lawsuit that alleged that Knight Landesman, the former publisher of Artforum magazine, sexually harassed a former employee and at least eight other women.

The lawsuit, filed in October 2017, included accusations that Mr. Landesman — a power broker in the art world — had groped, attempted to kiss and sent vulgar messages to the women, and, on occasion, retaliated against them when they spurned his advances. Mr. Landesman resigned hours after the lawsuit was filed.

The former employee, Amanda Schmitt — the plaintiff in the case — did not sue for workplace sexual misconduct because the statute of limitations had run out; instead, she brought a retaliation claim against Mr. Landesman that alleged he had cornered her at a restaurant in May 2017 and assailed her in front of others for having accused him of harassment.

But in his order filed last month, the judge, Justice Frank P. Nervo of State Supreme Court in Manhattan, wrote that five years had passed between the time Ms. Schmitt had worked for Artforum and when the restaurant episode took place — enough time “to eliminate any nexus between her employment and the alleged acts.” He found that Mr. Landesman had spoken in a “purely social setting,” that he was entitled to defend himself and that his statements were not defamatory.