http://en.wikipedia.org/wiki/Strict_scrutinyIt essentially states the government can't/shouldn't ban/prohibit something just because there is a compelling interest.
They must also select the least restrictive means to achieve the goal, and the law must be as narrowly tailored as possible.
First, it must be justified by a compelling governmental interest. While the Courts have never brightly defined how to determine if an interest is compelling, the concept generally refers to something necessary or crucial, as opposed to something merely preferred. Examples include national security, preserving the lives of multiple individuals, and not violating explicit constitutional protections.
Second, the law or policy must be narrowly tailored to achieve that goal or interest. If the government action encompasses too much (overbroad) or fails to address essential aspects of the compelling interest (under-inclusive), then the rule is not considered narrowly tailored.
Finally, the law or policy must be the least restrictive means for achieving that interest. More accurately, there cannot be a less restrictive way to effectively achieve the compelling government interest, but the test will not fail just because there is another method that is equally the least restrictive. Some legal scholars consider this 'least restrictive means' requirement part of being narrowly tailored, though the Court generally evaluates it as a separate prong.
Is there a compelling governmental interest to restrict firearms in a legislature? I don't know. Has anyone even defined one. Mentally ill persons are already prohibited, as are felons. If a legislator has a specific threat they can seek restraining order. Is anyone who is interested in harm really going to be stopped by the law? Or is it just a "feel good do nothing law". How often does violence in legislature occur? Has it ever occurred?
Even if there is a compelling interest is the law narrowly tailored. Would allowing only people with conceal carry permit to carry be acceptable? Does the ban need to be 100%?
Even if the law is narrowly tailored are there other mechanisms to ensure safety.
I am not saying I have the answers but the Constitution requires that these questions be at least asked.