OTTAWA -- Medical marijuana can legally be consumed in a range of ways -- from cannabis-infused cookies and brownies to cooking oils and tea -- the Supreme Court of Canada ruled Thursday.

The decision to remove limitations on what constitutes legally acceptable medical marijuana was being hailed by advocates of alternative forms of pot, but it angered Health Minister Rona Ambrose.

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

Not only was it a unanimous 7-0 ruling, 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.

Until now, federal regulations stipulated that authorized users of physician-prescribed cannabis could only consume dried marijuana.

But limiting medical consumption to dried pot infringes on liberty protections under the Charter of Rights and Freedoms, the court said.

"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 case stems from the arrest in 2009 of Owen Smith, former head baker for the Cannabis Buyers Club of Canada, who was charged after police found more than 200 pot cookies and cannabis-infused olive oil and grapeseed oil in his Victoria apartment.

Smith was acquitted at trial and later won an appeal.

The initial trial judge gave the federal government a year to change the laws around cannabis extracts, but the high court said Thursday its ruling takes effect immediately.

Alex Repetski of Thornhill, Ont., was thrilled at the news.

For about 18 months he has been converting dried medical marijuana into an oil to give to his three-year-old daughter, Gwenevere, who has a debilitating form of epilepsy that has left her developmentally delayed.

Since starting on the low-THC marijuana, Gwenevere has seen an incredible recovery, Repetski said.

But by converting marijuana to oil, Repetski could have been charged with possession and since he was giving it to his daughter, who is too young to smoke pot, he could have been charged with trafficking.

"Nice!" Repetski said after he read the decision.

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 when 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," said the court.

The decision was the latest in a series of rulings by the high court against the Harper government on a variety of issues.

In February, the court unanimously rejected the ban on providing a doctor-assisted death to mentally competent but suffering and "irremediable" patients and gave Parliament a year to draft new legislation.

In recent years the court has struck down mandatory sentences for gun crimes, federal efforts to tighten parole eligibility and the country's prostitution laws. It also squelched the Harper government's Senate reform plans, saying they require constitutional change and provincial consent.

Ambrose said she was "outraged" at the marijuana decision.

"The big issue here is the message about normalization," Ambrose 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."