A law change has made it legal to install secret cameras to spy on workers, and companies are employing private detectives to do so.

But Wellington International Airport has fallen foul of the Employment Relations Authority for using a private investigator to install cameras to spy on the sexual activities of a manager before the law was changed.

The airport recordings caught duty manager Dieter Ravnjak engaged in "sexual activity" with a woman in an emergency management room and he was dismissed for serious misconduct.

The cameras were installed by private investigator Cedric Hardiman, who also managed the airport's taxi and parking facilities.

At the time, the Private Investigators and Security Guards Act prohibited investigators from making recordings without the consent of the person recorded – in effect banning secret recordings.

Relying on this, Ravnjak appealed to the ERA, which has thrown out the evidence, calling it "fruit of the poisonous tree". It is understood Hardiman is being investigated for violating the act – unluckily for him, his indiscretion was a year too early.

A law change that came into effect on April 1 has removed that part of the law and it is now legal for private investigators to make recordings.

New Zealand Institute of Professional Investigators chairman Ron McQuilter said he did not know of a single person prosecuted for breaching the 1974 act and now Hardiman was in trouble after the section he violated had been removed.

McQuilter said even though the law preventing recordings had been lifted, there were still restrictions relating to filming people within their private residence. "It's taken a restraint off. What it allows us to do is give best evidence."

In the past, investigators had to give the evidence themselves, which often turned into questioning the investigator's character, he said.

The law change allowed the evidence to speak for itself.

"Private investigators only seek to determine the facts."

In another recent case, Coca-Cola Amatil used a private detective to track employee Keith Hooper on his lunch break. He had worked at the Christchurch bottling plant since 1992. Hooper was observed smoking cannabis in a park in September 2009 but was not drug-tested until seven months later, under the "reasonable suspicion" clause in his contract.

He was found to have 20 times the allowed amount in his system and was dismissed. The ERA said it was "troubled" at the interval between detection and testing but upheld the decision to sack him.

New Zealand Council of Trade Unions president Helen Kelly said using a private investigator and holding on to evidence "isn't the way to run a good business and include staff". Kelly said the employer should raise issues with employees as they occurred so they had a chance to defend themselves.

Coca-Cola Amatil managing director George Adams said the company had "zero tolerance for consumption of drugs or alcohol during work hours".

"We will use whatever lawful methods that are available to us as a responsible employer to ensure the safety and wellbeing of our employees."