Most employment relationships are what is know as "at will". This means that an employer can set the conditions of work much as it sees fit. This includes priohibiting its employees from taking outside work. That is unless doing so violates the terms of an employment contract or union agreement, or in some way constitutes a form of legally actionable discrimination, none of which you indicated to be the case in your situation.