They have the legal right, similar to the federal government in the USA. You can disagree with their judgement, but they clearly have the right to enforce it.
referring to legality is self referential, since they enact the laws, everything they do can be legal. US could sentence commissioners to prison by enacting certain laws or declare war, we wouldn't certainly say 'they have a right to do that' in that situation.