The June 7, 2011 burglary and rape of a tenant in Oakland, California, filmed on the victim’s cellphone, bears many unfortunate resemblances to a common scenario: The criminal enters the home through a vulnerable door or window and assaults the resident. When it’s a homeowner who is assaulted, the question of responsibility for that easily breached door or window stops with the owner. Unless windows or doors were structurally unsound or installed improperly, a homeowner has only himself to blame for living with flimsy or broken items that facilitated the intruder’s access.

Not so when the home is rented. Landlords began learning in the mid-1990s that sloppiness with tenant security could lead to hefty judgments and insurance settlements. Texas was the first to pass a statewide law mandating locks and key control. Called the Texas Security Devices Act, it forced landlords to secure their premises.

California has similar codes and requirements. California Civil Code Section 1941.3 requires locks on specified doors and windows, and mandates deadbolts for exterior doors. Section 1941.1 requires doors and windows to be unbroken. Importantly, landlords’ obligations go beyond “the letter of the law”—in crime-plagued neighborhoods, especially for properties that have been the subject of criminal activities already, landlords must take reasonable steps to protect their tenants, a duty that goes beyond strict compliance with the codes. When landlords fail to follow the law, tenants may move out, withhold rent, and use repair-and-deduct to fix the problem themselves.

But when landlords fail to follow the law and a tenant is assaulted, the consequence to the landlord can be more serious than a case of rent withholding. If tenants can show that the landlord knew of the code violation or unreasonably insecure situation, that he failed to address it despite having a reasonable amount of time to do so, and that the assailant gained entry by means of the substandard door or window, the landlord may end up being partially responsible for the tenant’s injuries and losses.

The tenant who was assaulted in the Oakland case will have this standard to meet should she sue her landlord. Although she complained repeatedly to the landlord about conditions at the rental, according to the Bay Citizen, it’s not clear that she included the back door. So far, her description to SF Gate (“The door that [the assailant broke] was so flimsy I didn’t even hear the sound of it being kicked in….”) doesn’t establish that it lacked the legal requirements of an exterior door.

This tenant’s use of her phone camera to record the break-in was the result of thinking that the intruder was in fact a repairman, yet another in a long line of repairpersons who had been entering her home without notice, in violation of California law. Her landlord’s flagrant violation of California’s privacy statute is inexcusable, and no doubt it fans the public’s outrage. But the landlord’s callous disregard of tenant privacy, though exposing him to penalties for those violations, will not result in making him partially responsible for the break-in.