Colorado may have recently voted to legalize marijuana for recreational use last year, but pot smokers can still legally be fired for testing positive for marijuana, because it is still illegal under federal law. According to a state appeals court ruling, even medical marijuana users can be fired if they test positive for the drug. 

A three-judge panel at the Colorado Court of Appeals ruled Thursday that federal laws prohibiting marijuana trump a Colorado state law protecting employees from being fired for lawful activities outside of their jobs, Reuters reports. Colorado is one of 20 states (not including the District of Columbia) that has legalized marijuana for medicinal use. In November, both Colorado and Washington voted to legalize marijuana for recreational use as well.

Colorado Court of Appeals announced the ruling in the case of Brandon Coats, who was rendered quadriplegic after a car accident and qualified for Colorado’s medical marijuana program. Sometime later, Coats was fired by the Dish Network when he tested positive for marijuana. Reuters notes that there was no evidence Coats was intoxicated at work.

After he was fired, Coats sued Dish Network to regain his job, arguing that a Colorado law protected him from bring fired for engaging in lawful activities outside of the workplace. A district court ruled against Coats, stating that Dish was able to terminate Coats due to federal laws against marijuana. The Colorado Court of Appeals upheld that ruling on Thursday. 

"[W]hile we agree that the general purpose of [the worker protection law] ... is to keep an employer's proverbial nose out of an employee's off-site off-hours business ... we can find no legislative intent to extend employment protections to those engaged in activities that violate federal law," Judge Janice Davidson wrote in the majority opinion.

While Coats was disappointed by the ruling, he and his lawyer have stated that they will take the case as high as the Colorado Supreme Court. 

"If someone's going to pick a fight with the federal government, it will be the state supreme court and not the court of appeals," Coats’ lawyer Michael Evans told Reuters.