Landlords do have the right to access their properties when necessary, but they must provide notice. California law requires providing written notice at least 24 hours before entering the property. Valid reasons for entry include emergencies, showing the property or making agreed-upon repairs.
Landlords can legally restrict some uses of the property. For instance, even though marijuana is now legal for recreational use in California, landlords may prohibit its use on the property. It is also legal to prevent tenants from keeping pets on the premises.