Democracy Forward, a left-leaning legal group that represents the plaintiffs, applauded the ruling.