The ruling, released on Thursday, struck down a decision, earlier approved by the Ticino cantonal government, on the firing of a civil servant found to be spending too much time pursuing unprofessional activities on the internet.
The municipality of Bellinzona used “spyware” to monitor the computer use of a manager working for the local civil protection service for a period of more than three months.
The software revealed that the the employee spent more than 20 percent of his time on computer activities unrelated to his job, such as private banking, social media and watching videos, some of which were of a pornographic nature, the ATS news agency reported.
Although the manager had 24 years experience, the municipality fired him.
But the federal government said the firing was null and void because the manner in which information against the employee was collected is illegal.
The court said collecting such evidence was contrary to a section of the labour act and the measure was “disproportionate”.
“The fight against abuses and checking the efficiency of work of employees is certainly of legitimate interest for the employer,” its ruling said.
“However, these objectives can be obtained through less invasive methods, such as by blocking certain internet sites as a preventive measure, as well as by an analysis of access to the web and email correspondence.”
This can be done in a way that conforms with federal requirements on the protection of data, the court added.