The First Amendment begins with the words, "Congress shall make no law....". The Second Amendment has no such wording to it and since the Bill of Rights is the highest law of the land it is superior to what any municipality can claim. The Bill of Rights does not allow Rights. It explains inalienable rights. Rights that can not be given or taken away.
Well, yes and no. "Rights" are ALWAYS (and were always intended to be) subject to both concepts of "public good" (see Madison's Federalist) and to what we call common sense/reason, or what the Founders called "virtue." This is precisely why the Founders established court systems, to deal with the actual implementation of the law that no written law can possibly contain in its original form.
Hence, the "free speech" amendment has a number of caveats attached later, including treason, sedition, "fire in a theater," and so on. The Founders certainly understood these limitations, but did not think it necessary to write down everything, nor was that possible.
Most important, they believed that power resided at the state and local level, and that communities had the authority to regulate such things that we consider violations (today) of rights, such as what dress was acceptable; when businesses could be open; and, yes, whether firearms or other weapons could be allowed in certain public places.