Many public servants cannot criticize. If they want to, they have to wait till they retire.
So having an obligation because you agree to perform certain functions or be in the employ of somebody doesn't abridge your rights. You consciously agree that if you join the forces, you're going to be putting on a uniform, you're going to be subject to transfer, and you're going to have to observe certain restrictions on what you can and cannot do.