Regulation 29 Legal requirements, law enforcement etc.
(1) Nothing in these Regulations shall require a communications provider to do, or refrain from doing, anything (including the processing of data) -
(a) if compliance with the requirement in question -
(i) would be inconsistent with any requirement imposed by or under an enactment or by a court order; or
(ii) would be likely to prejudice the prevention or detection of crime or the apprehension or prosecution of offenders; or
(b) if exemption from the requirement in question -
(i) is required for the purposes of, or in connection with, any legal proceedings (including prospective legal proceedings);
(ii) is necessary for the purposes of obtaining legal advice; or
(iii) is otherwise necessary for the purposes of establishing, exercising or defending legal rights.