(1)A constable, enforcement officer or authorised person exercising a power of entry under or by virtue of this Part may exercise a power under section 317(1)(c) to (e) in relation to records (whether written or electronic) only if the records relate entirely to the matters to which the power of entry relates.
(2)A justice of the peace may on the application of a constable, enforcement officer or authorised person issue a warrant disapplying subsection (1) to a specified extent if the justice of the peace is satisfied that the disapplication is necessary.
(3)A warrant may be granted under subsection (2) only if the justice of the peace is satisfied—
(a)that notice has been given to a person in control of the records of intent to apply for a warrant, or
(b)that the purpose of exercising the power of entry may be frustrated or seriously prejudiced by the giving of notice under paragraph (a).
(4)A warrant under subsection (2) shall cease to have effect at the end of the period of 28 days beginning with the day of issue.