Data Protection Act 2018
Processing of special categories of personal data for purpose of legal advice and legal proceedings
47. The processing of special categories of personal data shall be lawful where the processing—
(a) is necessary for the purposes of providing or obtaining legal advice or for the purposes of, or in connection with, legal claims, prospective legal claims, legal proceedings or prospective legal proceedings, or
(b) is otherwise necessary for the purposes of establishing, exercising or defending legal rights.