There is no city code provision that prohibits interior door locks in bathrooms. It sounds like you are living in a home where multiple rooms are being rented. This is probably illegal and unsafe. You should consider moving to a safer place.
The above constitutes general information only and should not be considered legal advice.
Dear Staten Island Tenant:
If your landlord committed a wrongful act and breached the lease and the covenant of quiet enjoyment, then you are correct, that a constructive eviction occurred. A constructive eviction suspends the tenant's obligation to pay rent, and so, the tenant may abandon the rented premises and move out.
The longer the tenant remains in full possession after declaring a constructive eviction the less likely a court will side with the tenant.
The answer provided to you is in the nature of general information. The general proposition being that you should try to avoid a bad outcome if you can.
I agree with both attorneys, specifically Mr. Bruno, who suggested that you're probably living in an unsafe and illegal apartment. I am sure you're getting what you pay for (what you can afford) so I am not taking your situation lightly, but hope that you find better arrangements soon. Good luck!
I'm just 3 "helpful" answers away from a free toaster-oven! I may be guessing or not licensed in your state. No atty/client relationship exists.