Disclosures required by law or made in connection with legal proceedings

38.(1) Personal data is exempt from the non-disclosure provisions where the disclosure is required by or under any enactment, by any rule of law or by the order of a court of competent jurisdiction.

(2) Personal data is exempt from the non-disclosure provisions where the disclosure is necessary

(a) for the purpose of, or in connection with, any legal proceedings including prospective legal proceedings; or

(b) for the purpose of obtaining legal advice,

or is otherwise necessary for the purposes of establishing, exercising or defending legal rights.