Unless you had an employment or union agreement to the contrary, or this action violated existing company policy, or your treatment was that the result of actionable discrimination, you can be discharged for this reason, any reason, or no reason at all . It's called at will employment. In such a work relationship an employer has a great deal of discretion in setting the terms and conditions of the workplace, including those surrounding termination. And frankly, what you did was highly unprofessional and a poor reflection on the business.