I don't get where the "descrimination" argument comes into it, or where it's illegal to do so. As if it is then over 500,000 people within our FTSE100 company, that we employ globally will have signed an illegal contract (though clearly the different companies within the company, and in different countries may have different policies - but I was just making a broad statement).
It seems you're discriminating against those using an illegal substance in their own time because there would be remnants in someone's system after it was affecting them.
Nothing to do with it being that person's choice or anything like that
