The "moral" is a big variable affecting the legal justification. But, the moral is highly "relative" in both ethics and legality.
In countries which adapt Civil Law e.g. Continental Europe, Scotland, and almost all non British common wealth countries, the moral influence depends on how the written positive criminal code is interpreted by the professionals.
In the other parts of Britain, Contin
ental Europe, and almost all British Common-Wealth nations, the moral intervention depends on the past case scenario, the ability of lowyers to emphasise, and the current moral trend which juries believe in.
Some customary law, adapted in the United Nation and Paris, France, depends on its "customary moral principle".
The moral also can be really relative across time, place, and occasion. Both legal and moral issues are treated differently in Scotland, the other parts of Britain, Paris, and the other parts of France....