The “Leno Amendment” to the Rent Ordinance (enacted through Ordinance 237-99 added to the list of “housing services” the rights permitted the tenant by agreement, including the right to have a specific number of occupants, whether express or implied, and whether or not the agreement prohibits assignment and/or subletting.
It also limited evictions for breaches of lease covenants where the landlord has unreasonably withheld consent to sublet and the tenant has only made a one-for-one replacement of occupants.
You can read the full text of Ordinance 237-99 here.