A federal judge has ruled that a New Jersey company is allowed to indefinitely suspend an employee over his use of state-legal medical marijuana, continuing a recent trend of judges siding with employers who discriminate against cannabis users, even in states that have legalized the plant. Daniel Cotto Jr., the plaintiff in this particular case, sued Ardagh Glass for suspending him from work over his legal use of medical cannabis.

According to court documents, Cotto was using medical marijuana under his doctor’s advisement to treat a “severe neck and back injury” he suffered in 2007. Cotto was injured again in November 2016, hitting his head on the roof of a forklift, and temporarily left his job to receive medical care. Company officials refused to let him return to work, however, unless he passed a drug test, which he would be unable to do because of his legal cannabis use.

Cotto argued that the company’s decision to suspend him indefinitely was a violation of the New Jersey Law Against Discrimination and the state Compassionate Use Medical Marijuana Act (CUMMA). But U.S. District Court Judge Robert B. Kugler disagreed, dismissing the case and ruling that Cotto’s “discrimination claims turn entirely on the question of whether he can compel Ardagh Glass to waive its requirement that he pass a drug test,” the Vineland Daily Journal reports.

“It is plain that CUMMA does not require Ardagh Glass to do so,” the judge continued. “We therefore find that (Cotto) has failed to show that he could perform the ‘essential functions’ of the job he seeks to perform. Ardagh Glass is within its rights to refuse to waive a drug test for federally prohibited narcotics.” Kugler noted that, like most states, New Jersey does not explicitly protect the employment rights of medical cannabis users, and therefore employers “may continue to [ban the use of cannabis] through lawful workplace drug testing policies,” Marijuana Moment reports.

This is not the first time that Ardagh has fought its employees over their legal cannabis use. Last summer, another employee sued the glass company after being fired over his legal medical marijuana use. Joseph Cobb III injured himself on the job last spring, and was immediately tested for drugs and alcohol per company policy. Cobb failed the test, because his doctor had recommended that he use cannabis instead of opioids to treat his chronic pain, and was fired. Cobb sued, but given the precedent set by Cotto’s case, his chances of success are looking slim.

Even though recent research has indicated that legal cannabis is associated with a decrease in workplace fatalities, employers have traditionally sided against cannabis users. Although medical marijuana is legal in 30 states and D.C., only nine states, including Maine and Arizona, have established laws to prevent businesses from firing employees over legal medical marijuana use. Insurance and workplace compensation programs have also used cannabis as an excuse to deny employee benefits.

A 2015 survey found that a majority of human resources managers were implementing new policies to crack down on cannabis users, highlighting the need for laws to protect these individuals’ right to medicine and gainful employment.