The relevant Natural law theories

Critically pleas explain this statement with full reference to the relevant natural law theories.   In your carefully thought and well comprehensive response, kindly explain the function of the law, and its role in relation to the needs of the community

“Apartheid was legal, the holocaust was legal, slavery was legal, colonialism was legal, sexism was legal. Legality is a matter of power, not justice”