A Scottish court has warned that President Donald Trump’s Aberdeenshire golf club risks charges of voyeurism if “officious bystanders” take photos of female hikers peeing near the course.

Sheriff Donald Corke issued the warning as he ruled in a case brought by local woman Rohan Beyts. She sued the Trump International Golf Links Scotland for damages for invasion of privacy after at least one staff member took photos of her last April as she urinated during a walk across the seaside course last year. She demanded $3,750 in damages at the Edinburgh Sheriff Court, saying that the club breached data protection laws.

Corke ruled against damages for Beyts Wednesday, saying that her attorney failed to prove that the distress she suffered was based on the club’s failure to register under the Data Protection Act.

But he branded the club’s police complaint against Beyts “frivolous,” saying that it was “lawful” that she discreetly relieved herself as she walked across the course, taking advantage of public access to property protected under Scottish law. Beyts is a known opponent of the controversial course.

“Officious bystanders taking pictures of females urinating in the countryside put themselves at very real risk of prosecution whether for a public order offence or voyeurism,” Corke said.

Beyts told the court she had a bladder condition at the time and that she tried to hide from sight to relieve herself during a walk, the BBC reports. Four days after the incident, police charged her with public urination and told her that she had been photographed. Those charges were dropped.

The 62-year-old had “a reasonable expectation of privacy” and should not have been photographed — just as men seen urinating on the course are not photographed, Corke ruled.

Both sides claimed victory in the decision.

In a statement, the Trump club hailed Corke’s decision and called Beyts a “shameless activist with a history of antagonistic behavior. “She came on to our property with a hostile opponent of the project looking for trouble,” it said. “Members of our greens-keeping staff were flabbergasted at what they witnessed and reported the incident to the police.”

Beyts’ attorney, Michael Dailley, said his client lost compensation on a “technicality.” He and Beyts viewed the case as a reaffirmation of land access for walkers, which they claim infuriates the president.

A Police Scotland document revealed officials’ concerns about conflict between the law and what Trump expected on his course. “Their belief is that the land is private and that they will be able to restrict access unconditionally,” the report said of Trump officials, according to the Guardian. “This is obviously not the case.”

Beyts told reporters after the ruling that her case was never about compensation. “I wasn’t interested in money,” she said. “I was only interested in clearing my name when the Trump Organization representative spoke of me committing a deliberate and shameful act within a few feet of the clubhouse. That was not the case.”

“My message for Donald Trump is: Treat people with respect and dignity, and you will get treated with respect and dignity,” she added.

Companies using surveillance equipment, such as the CCTV cameras at the Trump club, are required under U.K. law to register under the Data Protection Act. The club finally registered four months after photographing Beyts, the Guardian reported.

Trump’s golf course is has caused great controversy in surrounding Aberdeenshire communities. Residents have accused him of ignoring environmental laws and bullying homeowners who refused to sell to him.

After he was elected president, Trump pressured British politician Nigel Farage at a meeting to battle wind farms for energy because he’s concerned they would blight the views from his Aberdeenshire course.