That would be illegal (for the supervisor/university) in the US.