The ruling stems from a lawsuit filed by four cannabis businesses claiming that the law violates the U.S. Constitution.