No, but there are tons of people who believe something is moral as long as it's legal, and even more people who believe something being illegal makes it inherently immoral.
I am afraid you have this very straight :/
I am so sick of our corporate-fascist world order. Big corporations are basically the worst dictator you can imagine, but with money dedicated to a PR department.
Yeah, imagine a 2D graph with axes going from legal to illegal, and legitimate to illegitimate.
Some things are legal although they are illegitimate (like 'Destroying the planet'), and others are illegal although they are legitimate (like some forms of civil disobedience or sabotage).
In an ideal world the two are aligned, but ours is not ideal. Also worth noting legal-illegal is rather objective, while legitimate-illegitimate is rather subjective.
I found Thoreau interesting on the topic, who commented being jailed for withholding taxes to not support the war: "The bars are meant to separate bad from good people".
/me does that unusual thing of actually reading the article ... ah, here we go "Protestors physically blocked oil tankers in the harbour... When the protestors were ordered to move to allow vehicles to pass, Greta was among those who refused. She was then dragged away by police."
So she wasn't peacefully protesting, which by the way IS legal in most places; she was being obstructive, somewhat like those Just Stop Oil muppets who glue themselves to roads. It's fine to protest. It's not fine to prevent others from living their lives, and that's why she was prosecuted.