If they tolerate it for a while before canning you for it, you MIGHT win a lawsuit over it, but it’s doubtful. I mean, at the end of the day, you WERE impaired by substance abuse at the workplace. That they knew and tolerated it in the past is gonna be hard to prove and is arguably immaterial to the current offense.