No tenant shall refuse to permit the owner, or his or her agent or employee, to enter such tenant's dwelling unit or other space under his or her control to make repairs or improvements required by this code or other law or to inspect such apartment or other space to determine compliance with this code or any other provision of law, if the right of entry is exercised at a reasonable time and in a reasonable manner. The department may by regulation restrict the time and manner of such inspections.