When that was written, who were "the people"?
Until the 14th amendment, it could easily be said that the 2nd amendment only proscribed the federal government, NOT the state governments, and therefore states could do whatever they wanted with gun laws.
The 14th amendment gave the "rights" of people of the united states to all people regardless of the states they lived in, but it wasn't originally interpreted to mean that the restrictions on the actions of the federal government applied to the states, only that whatever rights were conferred upon a person by the basis of being a citizen of the united states could not be infringed by a state.
Later, the 14th amendment was interpreted as appending the U.S. constitution to the constitutions of each state -- at that point, if the federal government was not allowed to infringe upon gun ownership, neither should the state be allowed to do so.
I do not think the founders intended to dictate to the states that citizens must be allowed to own guns. I think they only intended to prevent the federal government from taking away anybody's guns. The reason was that states didn't want to give up power to the federal government to defend themselves, but the amendment clearly specifies that individuals cannot be restricted from gun ownership by the federal government.
So I could buy the argument that each state has a right to restrict gun ownership, for their own citizens, in keeping with their own state constitutions.
The federal government could require states to honor the rules of other states for those other state's citizens (like carry rules).
But the federal government should NEVER have been allowed to enact an assault weapons ban. The 2nd amendment CLEARLY prohibits the federal government from infringing in any way with the rights of the people. A STATE could ban assault weapons under that interpretation, but not the federal government.
Rudy Giuliani supported the federal assault weapons ban, which directly contradicts his statement now that it is a "state" thing.
And he said that he supports this appeals court ruling, which directly contradicts his claim that it is a state thing, because this appeals court said the district had no right to make a law for it's own people.