New York has a law to cover exactly this - the landlord has to provide acess through the building. This (and other zoning shenanigans) is why so many buildings in NYC have public atriums or plazas attached. Of course many of those are also conveniently locked all the time because the landlords "forget" that they're public space.