Not according to the 9th Circuit Court of Appeals – they demonized cannabis more than opiates, as folks with an opiate prescription can still purchase fire arms.
Read the case:
https://cdn.ca9.uscourts.gov/datastore/opinions/2016/08/31/14-15700.pdf