DENVER — A Colorado proposal to allow people on probation or parole to use medical marijuana won unanimous approval Thursday in its first test in the state Legislature.

The state has allowed medical marijuana use for 15 years — but not for people on probation or parole.

The House Judiciary Committee voted 13-0 to change that policy by saying that pot use doesn't amount to a probation violation for people with medical clearance to use the drug.

"If it's in the constitution, you should have the right to use it on probation," said Rep. Joe Salazar, D-Thornton and sponsor of the bill.

The change wouldn't apply to probationers whose crime was related to marijuana.

Colorado's hearing comes two days after Arizona's highest court ruled that marijuana patients in that state should be allowed to use the drug while on probation or parole.

Rhode Island and the U.S. Virgin Islands also allow probationers to use medical marijuana, according to the pro-legalization Marijuana Policy Project. California law specifies that anyone on parole can ask the courts to be allowed to smoke medical marijuana after being released from jail or prison.

Other states have seen a mish-mash of responses in the courts on whether people can smoke pot while on probation and parole.

Colorado's Court of Appeals ruled in 2012 that people on probation should not be allowed to use medical marijuana. State analysts who reviewed the bill weren't sure how many people currently wind up back in jail because they fail a marijuana-related drug test while serving probation or parole.

Lawmakers worked late into the night Thursday hearing from marijuana patients who support the bill. They included Christyne Smiley of Boulder, who is on probation and not allowed to use marijuana to treat an eye condition called a "macular pucker." Instead she has to use prescription drugs she considers less effective.

"Honestly, marijuana works better," said Smiley, who said the bill would allow people on probation "to get the relief to which they have a right."