Cal. Welf. & Inst. Code § 676
(a) Unless requested by the minor concerning whom the petition has been filed and any parent or guardian present, the public shall not be admitted to a juvenile court hearing. Nothing in this section shall preclude the attendance of up to two family members of a prosecuting witness for the support of that witness, as authorized by Section 868.5 of the Penal Code. The judge or referee may nevertheless admit those persons he or she deems to have a direct and legitimate interest in the particular case or the work of the court. However, except as provided in subdivision (b), members of the public shall be admitted, on the same basis as they may be admitted to trials in a court of criminal jurisdiction, to hearings concerning petitions filed pursuant to Section 602 alleging that a minor is a person described in Section 602 by reason of the violation of any one of the following offenses:
(b) Where the petition filed alleges that the minor is a person described in Section 602 by reason of the commission of rape with force or violence or great bodily harm; sodomy by force, violence, duress, menace, threat of great bodily harm, or when the person is prevented from resisting by any intoxicating, anesthetizing, or controlled substance, or when the victim is at the time incapable, because of mental disorder or developmental or physical disability, of giving consent, and this is known or reasonably should be known to the person committing the offense; oral copulation by force, violence, duress, menace, threat of great bodily harm, or when the person is prevented from resisting by any intoxicating, anesthetizing, or controlled substance, or when the victim is at the time incapable, because of mental disorder or developmental or physical disability, of giving consent, and this is known or reasonably should be known to the person committing the offense; any offense specified in Section 289 of the Penal Code, members of the public shall not be admitted to the hearing in either of the following instances: