The federal government has lost the first skirmish in a proposed medical marijuana class action lawsuit, which accuses Health Canada of violating the privacy of medical marijuana users.

The legal action was filed under pseudonyms, but Ottawa wanted the people to use their real names.

The case was launched late last year after Health Canada sent letters to the 40,000 people in the medical marijuana access program with the program's name on the envelope.

Recipients were upset, saying their privacy had been violated. They worried they'd lose their jobs or be victims of a home invasion.

Health Canada apologized for the gaffe, calling it an administrative error.

The proposed class action legal papers, handled by a Halifax law firm, were filed under the names John Doe and Suzie Jones. The federal government argued their real names should be on the lawsuit.

McInnes Cooper lawyer Jane O'Neill argued against that.

“It’s a breach of privacy case so to refuse to allow them to remain private throughout the lawsuit in essence defeats the merits of the claim,” she said.

Debbie Stultz Giffen, chair of Maritimers Unite for Medical Marijuana, said the federal government’s position would violate people's rights for a second time,

“It’s just like pouring salt on an open wound,” she said.

The judge ruled against the federal government saying the plaintiffs aren't users, but patients and identifying them would disclose personal health information.

The next step in the case is to ask a judge to certify the class action.