It’s official: Gotham’s Commission on Human Rights has dropped its lawsuit against seven Hasidic-owned stores in Brooklyn whose high crime it was to post signs giving the following notice: “No Shorts, No Barefoot, No Sleeveless, No Low Cut Necklines.”

On Tuesday, the commission agreed the signs can be re-posted provided they include an additional line saying what the shops had contended all along: All customers are welcome. Too bad it took 18 months of litigation to get here.

The signs in these shops were no different than the dress codes required by posh Manhattan restaurants or even some local pizzerias. Only in the fevered imagination of the city’s human-rights office could they be construed as a nefarious attempt to impose Orthodox Judaism on customers.

Even after an administrative law judge rejected that argument, the commission continued to press a lawsuit, raising the proposed fines from $2,500 per store to an astonishing $75,000. It’s hard to say whether this reflected some animus against Orthodox Jewry or simply an effort to extort more revenues for the city through small-business fines — or a little of both.

On the eve of trial, the city essentially caved. The commission’s statement that the store owners “understand their obligations” is pure face-saving. The shopkeepers won a near-total victory, thanks to the top-flight law firm Kirkland & Ellis, which took the case pro bono.

Still, the signals this litigation sent were disturbing, and the larger question is this: If the city’s Commission on Human Rights is supposed to protect New Yorkers’ civil and religious liberties, who protects us from the Commission on Human Rights?