In general a government can do whatever they can get away with.
The rest (believing they can't do this or that, because it's in some constitutional document, or violates a basic right) is sovereign citizen kind of self-delusion.
If a government operates outside its remit, competing forces (opposition parties, civil society, counter-elites, foreign influences) use that as an opportunity to gain power by calling attention to the violation. “The law” may be a fuzzy illusion, but it’s delineating a real social boundary. Legal processes are a way of processing that conflict symbolically rather than jumping straight to open warfare. But you better believe that open warfare will result if those boundaries are ignored for long enough or if they are violated egregiously.
Which is the reason that governments are clamping down hard on private communication - so that they can nib the "open warfare" part in the bud before it can be organized enough to become a threat. I'm (not) looking forward to the first cyber civil war to find out how well that will work out for them.