The Supreme Court yesterday affirmed federal efforts to bar those convicted of crimes involving domestic violence from owning guns.