Unless requested by a parent or guardian and consented to or requested by the minor concerning whom the petition has been filed, the public shall not be admitted to a juvenile court hearing. The judge or referee may nevertheless admit such persons as he deems to have a direct and legitimate interest in the particular case or the work of the court.