Martin Lansley accessed confidential data about a Royal visit
A civilian police worker stole "highly sensitive" data about a Royal visit by the Prince of Wales from a computer, Cardiff Crown Court heard.
Martin Lansley, 31, was working for Dyfed-Powys Police when he downloaded classified material meant for only senior officers.
He admitted accessing unauthorised data and unauthorised manipulation of data.
Lansley, of Pennant, near Aberaeron, Ceredigion, was given a 12-month suspended sentence.
He was also ordered to carry out 250 hours of community service.
The court heard how Lansley hacked officer's passwords, police station door codes and even the electronic signature of the chief constable.
He found confidential details of a Royal visit by Prince Charles who has a property in Carmarthenshire.
Lansley used a computer given to him by the Dyfed-Powys Police force to download the secret data.
Roger Griffiths, prosecuting, said: "Lansley had access to get to the most sensitive material on his computer.
"Among items found was an operational order relating to a past Royal visit and links to the police national computer.
"There were lists of passwords and photographs of officers and the electronically recorded signatures of senior officers - including the present and previous chief constables.
"There were door codes of police stations force wide and information relating to pay structures and budgets.
"It was clearly material that he would not have been authorised."
Cardiff Crown Court heard how PhD graduate Lansley, working as a wellness officer, cost the force more than £1,000 in man hours when workers had to reset the system and all staff passwords.
The Prince of Wales and the Duchess of Cornwall have a holiday home at Myddfai, near Carmarthen, in the force area.
Eugene Egan, defending, said Lansley was driven by "curiosity" to hack into the confidential files.
He said: "The files were not used for any unlawful purpose or disclosed to anyone."
Judge William Gaskell QC said: "It was possession of material highly damageable to the police force and their operations - there is no justification for this.
"I'm sure your reason for it was vanity. You did it because you thought you could."