(7) Nothing contained in or done under the authority of any law shall be held to be inconsistent with or in contravention to the extent that the law in question makes provision whereby persons of any such description as is mentioned in subsection (3) may be subjected to any restriction on the rights and freedoms guaranteed by sections 7, 9, 10, 11 and 12, being such a restriction as is authorised by section 7(2), 9(5), 10(2), 11(2), 12(3)(a), 12(3)(b) or 12(3)(h), as the case may be.