You may believe that the Second Amendment to the U.S. Constitution, the right to bear arms, ensures your ability to buy and carry a gun. However, there are a number of caveats imposed by both state and federal law.
According to the California Department of Justice’s Bureau of Firearms, if you are one of these exceptions, you may not own a gun, or have one on your person.
Simply having a mental illness does not negate your right to have a gun. However, if you have communicated a threat against someone to a psychotherapist, that licensed professional has a duty to report that to law enforcement, and it will cause you to lose your right. A court may determine that you are a threat to yourself or others, that you cannot stand trial because of mental incompetence, or you cannot be found guilty of a charge because of insanity, and consequently revoke your right to own or possess a gun.
There are a number of felony and misdemeanor offenses that will prevent you from having a firearm. Restraining orders will also result in the loss of your gun. You could also be banned from firearm ownership if you are in the country without proper documentation, a fugitive from justice, dishonorably discharged from the military or addicted to narcotics.
Threatening anyone could lead to a ban, but there are also specific positions that are protected. For example, people who serve as public officers or employees, school officials and judges receive extra protection from threats due to the nature of their duties.