California imposes a five year ban on firearms possession following a Sec. 5150 or 5250 hold. The five year bar for a Sec. 5150 hold can be disputed in court. See Welfare & Institutions Code, Sec. 8103.
The lifetime ban for a Sec. 5250 hold comes from federal law. 18 USC Sec. 922(d)(4). See 18 USC Sec. 925(c) for a provision relating to relief from that disability.

