The Canadian Public Service Employment Act, that came into full effect at the end of 2005, attempted to provide some codified guidelines across the entire Canadian federal publics service, with respect to public servants' rights and responsibilities with regard to political expression, activity, and candidacy, that were further articulated by additional policies. Personally, I wouldn't say its intent is to "limit" political expression, but rather to provide a prudent code of conduct for assuring that the public service functions in a non-partisan manner, and is perceived as such by citizens and other stakeholders.
You can learn more about the scope of coverage, and how individual behaviour is broached, here: http://www.psc-cfp.gc.ca/plac-acpl/index-eng.htm One of the more interesting elements is a structured self-assessment tool that encourages public servants to take into consideration the nature of their role, the visibility of that position, their own visibility within the community and within whatever political "expression" they intend to take on, and a number of other factors. One of the goals is to have a better personal sense of what forms or contexts of "political expression" may risk compromising the impartiality of the public service.
You can imagine that there are ongoing discussions about the scope of what falls under the heading of "political activity" with the landscape of such expanding daily. Political expression used to be just campaigning for candidates (or being one yourself), letters to the editor, and campaign signs on your lawn. Of course, things have branched out quite a bit since those days, making it trickier to find that boundary between one's political expression rights as a citizen, and one's ethical responsibilities to support and sustain the impartiality of the institution that employs you. And with elected officials themselves increasingly making use of social media, it sometimes gets even trickier to find that line.
Whatever the case, and whatever the jurisdiction, whether it's political expression or any other form of behaviour, (e.g., claiming overtime, use of scents in the office, internet use), it's always good to have a clear and set of guidelines that are understood by all. People can get along remarkably well when they understand what's expected and why.