The ruling came after seven years of legal wrangling in the National Rifle Association’s challenge to a 2018 law passed after ...