(a) Notwithstanding any other law concerning public hearings and records, any hearing or trial held under sections 257.51 to 257.74 shall be held in closed court without admittance of any person other than those necessary to the action or proceeding. All papers and records, other than the final judgment, pertaining to the action or proceeding, whether part of the permanent record of the court or of a file in the state Department of Human Services or elsewhere, are subject to inspection only upon consent of the court and all interested persons, or in exceptional cases only upon an order of the court for good cause shown.
(b) In all actions under this chapter in which public assistance is assigned under section 256.741 or the public authority provides services to a party or parties to the action, notwithstanding statutory or other authorization for the public authority to release private data on the location of a party to the action, information on the location of one party may not be released by the public authority to the other party if:
(1) the public authority has knowledge that a protective order with respect to the other party has been entered; or
(2) the public authority has reason to believe that the release of the information may result in physical or emotional harm to the other party.