Massachusetts’ highest court recently issued a first-of-its-kind ruling that says employers can’t fire workers just for being medical marijuana patients.

Though it involves a company headquartered in Irvine, the decision doesn’t have legal implications for businesses in California, according to San Diego-based labor attorney Danielle Moore. Such a court-driven change actually isn’t even possible in the Golden State, she said, since language in Proposition 64 specifically guarantees employers’ right to fire workers who test positive for cannabis.

Still, Moore said the decision out of Boston is an important example of courts across the country gradually “softening” their stance on marijuana — a change that could soon be felt as far away as California.

“This is really a switch,” said Moore, who’s with the national employment law firm Fisher Phillips. “As the country becomes more and more marijuana friendly, I could see that trend developing, and we could start to see some changes in the years to come.”

The Massachusetts case dates back to 2014, when Advantage Sales and Marketing fired Christina Barbuto following her first day on the job at its Boston office.

Barbuto says she told the company that she treats her Crohn’s Disease with legally obtained medical marijuana. Though she says company officials assured her it wouldn’t be a problem, she was fired after testing positive for cannabis.

Barbuto sued the company, but a Superior Court in Massachusetts dismissed the case in 2015. So she appealed.

The California-based marketing agency argued the firing was justified because marijuana is illegal under federal law. And an attorney for Advantage Sales and Marketing (which does business as Advantage Solutions) tells The Boston Globe they’re “confident” that the company acted lawfully in firing Barbuto.

But on July 17, the state Supreme Judicial Court said Barbuto’s lawsuit against the company can move forward. The court cited state disability laws, saying employers have to make “reasonable accommodations” and can’t enforce blanket anti-marijuana policies against workers whose doctors have recommended medical marijuana to treat their illnesses.

That’s big, Moore said, because every other time such cases have come before state high courts, the ruling has come down in favor of employers.

In 2015, the Colorado Supreme Court ruled that the satellite TV company Dish Network was within its rights when it fired telephone operator Brandon Coats, a quadriplegic who used medical marijuana in off-duty hours to ease leg spasms.

The California Supreme Court made a similar ruling in 2008, when they ruled that a telecommunications company had a right to fire retired Air Force veteran Gary Ross over his medical marijuana use. And Moore said similar rulings have come down over recent years in Washington, New Mexico and Montana, among others.

But 29 states have now legalized medical marijuana, while eight states permit recreational consumption. And a new Gallup poll shows an all-time high 45 percent of Americans have tried marijuana at least once.

“As the culture changes, so do the courts,” Moore said.

Another test is underway in Rhode Island.

Christine Callaghan (with help from the ACLU) sued a fabric company that refused to give her an internship in 2014 after she told them she was a medical marijuana patient and would probably test positive for the substance.

In a May ruling — which opens with the Beatles lyric “I get high with a little help from my friends” — Superior Court Judge Richard Licht said Rhode Island law protects marijuana consumers from employment discrimination.

Darlington Fabrics said it plans to appeal that ruling to Rhode Island’s highest court.

It’ll take more than a John Lennon-loving judge to make life easier for cannabis enthusiasts in California, though.

Related: Marijuana may be legal, but it can still get you fired

Ask an Attorney: Job interview questions and drug testing

Voters approved Prop. 64 by a healthy margin on Nov. 8. That means Californians are free to consume marijuana on private property, carry up to an ounce and grow up to six plants at home.

But Prop. 64 is unique from medical marijuana laws in Massachusetts and recreational laws in other states in that it also explicitly says employers remain free to test workers for cannabis use before hiring them, or at any point during their careers. And if workers test positive, the law says companies can choose to let them go – even if there’s no indication they were actually high on the job.

Since those rights were spelled out in Prop. 64, Moore said any changes to that employment policy would have to come through either new legislation or a new ballot initiative.

The issue is further complicated by the way marijuana works in the body and limits of today’s workplace drug tests.

Unlike alcohol and harder drugs, cannabis can be detected in the blood and urine long after its mind-altering effects have worn off, making it impossible to tell whether an employee was impaired while they were working.

Scientists are scrambling to come up with better tests. But in the meantime, there’s anecdotal evidence that some companies have quietly chosen to stop testing for marijuana since Prop. 64 and other legalization laws have passed.

Moore said two companies she represents have done so. And she suspects even more firms might consider following suit after recreational cannabis sales start in California on Jan. 2 — if for no other reason than to avoid limiting their talent pools.

The Associated Press contributed to this report.