Can an academic department restrict enrollment in major courses?
Yes. Academic departments can restrict enrollment in major courses to allow only students officially accepted in the major to register for specific courses. An academic department may also restrict enrollment by requiring students to drop a class if they have been disqualified from the major, or they have not achieved a C average in the major, or have not met the stated course prerequisites.

Are there any enrollment restrictions in upper-division courses?
Enrollment in upper-division courses is normally restricted to students with junior, senior, or post-baccalaureate standing or who have the necessary prerequisites. Exceptions are subject to the approval of the instructor and department chair.