In a comment to this answer, user Uma states (picking up an example about fizzy water I suggested):
The limits ordained by religion are that the caliph shouldn't prevent doing an obligatory religious duty, and he shouldn't permit any haram action ... obedience to him is obligatory unless he commands disobedience to Allah. If he wants to ban fizzy drinks in turquoise cups he can, and the muslims must obey him
This is somewhat surprising to me; I expect that there are certain limits in sharia as to how much the caliph can restrict the freedom of his subjects. It certainly seems to be recognized in shariah that the governing organs can issue regulations such as traffic law, mercantile law, etc. That raises the question:
Which legal limits (as opposed to recommendations or exhortations) are there to the right of the caliph to penalize or criminalize otherwise halal behavior?
To give an analogue to what I'm looking for from a system of law I'm more familiar with: in modern law, the role of limiting the power of the governing organs of the state falls mostly to the constitution of a country, and banning fizzy water would go against the basic right of personal liberty enshrined in many constitutions. Limiting that right would require a collision with a constitutional duty of the state (fizzy water would not generate such a collision), and would thus be unconstitutional.