So long as your treatment is really based on your "bad reputation" and not due to some form of legally actionable discrimination, it is legal. Additionally, this action must not violate the terms of any applicable union agreement or employment contract. The fact is that most employees are "at will". This means that their company can set the conditons of the workplace much as they see fit or deem appropriate. This includes who to promote, when and why. For their part, an employee can either accept the situation, complain and risk termination, or quit.