It used to be that the expression "You can't fight city hall" carried more weight than it does today. That was because of a long-standing legal doctrine known as "sovereign immunity," which held that as a general rule it was difficult if not impossible to sue a government acting in that capacity, or a government agency.
Although the sovereign immunity defense used to be broadly applied to preclude lawsuits against the government, the modern trend has been to limit the applicability of sovereign immunity and thereby to increase the circumstances under which a person injured in his person or his property can seek redress from the government if he can show that the government was negligent or otherwise at fault for the harm. Premises liability is one of these areas of personal injury law in which a legal claim against the government is now possible.
California has enacted a statute that provides for an exemption to sovereign immunity in cases where an injury on property of a public entity can arise from the failure to inspect or the existence of a hazard to health or safety on the premises.
The doctrine of sovereign immunity still exists, so it may not always be possible to include the California state or the federal government in a lawsuit for personal injury. But if you have been injured while on government-owned property, it can still be a sound idea to consult with a personal injury attorney to see if the premises liability exception to sovereign immunity can apply to your situation.