Lawfulness of processing

6.(1) Processing shall be lawful where

(a) the data subject has given consent to the processing of his personal data for one or more specific purposes; or

(b) the processing is necessary

(i) for the performance of a contract to which the data subject is a party;

(ii) for the taking of steps at the request of the data subject with a view to entering into a contract;

(iii) for compliance with any legal obligation to which the data controller is subject, other than an obligation imposed by contract;

(iv) in order to protect the vital interests of the data subject;

(v) for the administration of justice;

(vi) for the exercise of any functions of either House of Parliament;

(vii) for the exercise of any functions conferred on any person by or under any enactment;

(viii) for the exercise of any functions of a public authority;

(ix) for the purposes of legitimate interests pursued by the data controller or by the third party to whom the data is disclosed, except where the processing is unwarranted in any particular case by reason of prejudice to the rights and freedoms or legitimate interests of the data subject; or

(x) processing is necessary for the purposes of the legitimate interests pursued by the data controller or by a third party, except where such interests are overridden by the interests or fundamental rights and freedoms of the data subject which require protection of personal data, in particular where the data subject is a child.

(2) Subsection (1)(b)(x) shall not apply to processing carried out by public authorities in the performance of their tasks.