The Supreme Court of Canada has ruled unanimously that medical marijuana can be legally consumed in products such as cookies, brownies and teas, a decision that "outraged" the federal government but elated the baker at the centre of the case.

Federal regulations had previously stipulated that authorized users of physician-prescribed cannabis could only consume dried marijuana.

But the high court said in a 7-0 decision on Thursday that limiting medical consumption to dried pot infringes on liberty protections under the Charter of Rights and Freedoms.

"Across the country there will be a lot more smiles and a lot less pain," said Owen Smith, a former baker for the Victoria Cannabis Buyers Club, whose 2009 arrest spurred the legal challenge.

Smith was charged after police found hundreds of pot cookies and cannabis-infused olive and grapeseed oils in his Victoria apartment. He was acquitted at trial and won an appeal.

The decision was yet another rebuke of the Harper government's tough-on-crime agenda.

Not only was it unanimous, but the court made a point of attributing the written decision to the entire court -- something the justices do when they want to underline a finding.

"The prohibition of non-dried forms of medical marijuana limits liberty and security of the person in a manner that is arbitrary and hence is not in accord with the principles of fundamental justice," said the written judgement.

The initial trial judge in Smith's case gave the federal government a year to change the laws around cannabis extracts, but the top court said its ruling takes effect immediately.

Cheryl Rose, whose daughter Hayley takes cannabis for a severe form of epilepsy, was overjoyed by the decision and said her 22-year-old's seizures have dropped dramatically.

Under the old law, Hayley was ingesting 15 capsules of dried cannabis daily. Now, she will only have to swallow one concentrated capsule made with oil.

"Without having extracts available for her, I don't think we'd be able to keep it up. It's way too much for a person to consume," she said. "She's finally going to fully have her life back."

Alex Repetski, of Thornhill, Ont., could have been charged with possession and trafficking for converting dried bud into oil for his three-year-old daughter, Gwenevere, whose debilitating epilepsy has left her developmentally delayed.

Since starting on the low-THC marijuana, Gwenevere has seen an incredible recovery, Repetski said. The decision means he no longer fears prosecution.

But implications of the ruling for authorized producers are uncertain, said Eric Paul, who heads Ontario-based licensed marijuana provider CannTrust Inc.

"Does this mean the legislation … gives us the right to provide oral products or some other form?" asked Paul. "The answer is it's not clear at the moment."

Limiting medical marijuana use to dried pot "limits life, liberty and security of the person" in two ways, the court said.

First, the prohibition on possession of cannabis in forms other than dried pot places a person at risk of imprisonment; they wouldn't face the same threat if they possessed dried marijuana buds.

It also exposes people with a legitimate need for marijuana to other potential medical ailments, it stated.

"It subjects the person to the risk of cancer and bronchial infections associated with smoking dry marijuana and precludes the possibility of choosing a more effective treatment."

The decision was the latest in a series of rulings by the high court against the Harper government on a variety of issues, including unanimously rejecting the ban on providing doctor-assisted death to mentally competent patients.

Health Minister Rona Ambrose said she was "outraged" by the marijuana decision.

"The big issue here is the message about normalization," she said. "The message that judges, not medical experts, judges have decided something is a medicine."

Ambrose noted that marijuana has never faced a regulatory approval process through Heath Canada.

"This not a drug," she said. "This is not a medicine. There's very harmful effects of marijuana, especially on our youth."

- With files from Laura Kane in Vancouver and Liam Casey in Toronto.