That begs the question when did judges become legislators? It seems they should be able to challenge whether a executive order is constitutional but not shut it down. I wonder where these same judges were when Obama changed the ACA law 37 times?
The president is the CinC and making a common sense decision that mentally deranged people not be permitted to carry military weapons is his duty. The judge is not legislating but interfering with military oversight probably just to test his ability to get away with it.