Immanuel Kant said this quote

The touchstone of everything that can be concluded as a law for a people lies in the question whether the people could have imposed such a law on itself.