It turns out that the spies aren't the only coercive government agency seemingly incapable of following the rules. The police had been unlawfully accessing government data on people's travel for more than a year:
Police broke the law by accessing Customs and Immigration data for more than a year when they did not have permission to do so.
The embarrassing situation saw police logging on to CusMod, Customs’ computer system, 15,799 times between December 2015 and January 2017 for border security reasons after an “administrative oversight” led to an authorisation expiry date being ignored.
It follows a December announcement by Inspector General of Intelligence and Security Cheryl Gwyn that the country’s spies also unlawfully accessed the same database for more than 20 years between 1997 and 2016.
[...]
Customs Minister Meka Whaitiri was informed in December after asking for information on other CusMod access arrangements.
CusMod is Customs' internal database of people's travel movements. Its used for setting border alerts, so agencies can be alerted if someone enters or leaves the country or arrange for them to be stopped, and it records information on customs officers interactions with people (so e.g. when they poke through all your electronic devices at the airport). Its the sort of thing you can see that there are legitimate law enforcement uses for. But those uses have to be legal and authorised. And the police are so institutionally useless, that they simply let that authorisation expire.
Their "defence" is that the searches would have all been legal if authorised 9that is, nothing was outside their internal policy, whatever that is). But that wouldn't stand up in court if they failed to apply for a search warrant, and it isn't good enough here. The police, of all agencies, need to obey the law, and be seen to obey it. Their behaviour must be beyond reproach. instead, we have systematic, SIS-like illegality. And that's simply not good enough. There's no suggestion in the article that anyone was held to account or faced employment consequences for this systematic illegality. And without that, there's simply no incentive for it not to happen again.