The Hatch Act in regards to the what happened:
Covered state and local employees
may not-
- be candidates for public office in a partisan election
- use official authority or influence to interfere with or affect the results of an election or nomination
- directly or indirectly coerce contributions from subordinates in support of a political party or candidate
That is a big stretch....