The Second Amendment makes no exceptions for misdemeanors, felonies, of restraining orders. The Second Amendment wording is absolute. Every gun law on he books is unConstitutional. The only possible exception is in the 13th Amendment in its reference to involuntary servitude as a punishment for crime which could be interpreted to disallow incarcerated persons to possess arms.
I don’t think it’s completely absolute. For example, people who are currently in prison shouldn’t be able to have guns. But the California law clearly violates the Second Amendment.