Here's the relevant parts from 518:
Sec. 518.123. - Right of entry; notice of inspection.
The Chief is authorized to enter any building, structure or premises at any reasonable time for the purpose of performing his or her duties under this chapter. If any owner, occupant or other person in charge of a building structure or premises subject to the provisions of this Code refuses, impedes, inhibits, interferes with, or obstructs lawful entry or access to any part of the building, structure or premises where an inspection authorized by this chapter is sought, the Chief may seek an inspection warrant pursuant to Florida law.
At the time of inspection, the Chief shall properly identify himself and shall advise the occupant of his right to refuse entry to the nonpublic areas of the building, structure or premises. He shall further advise the occupant that an inspection warrant may be obtained if entry is refused.
The Chief shall develop appropriate documents by which to serve notice in an area in which he intends to carry out a scheduled area wide inspection program. These documents shall include a notice to be delivered to each household or owner which shall include the following:
A summary of the requirements of this Chapter for which an inspection is being made to determine compliance therewith.
A statement advising the occupant or owner that entry for the purpose of inspection may be denied.
A statement that a notice of violation issued pursuant to the inspection may be appealed to the city's Special Magistrate.
At the time of inspection, the Chief or their duly authorized representative shall properly identify himself and shall advise the occupant or owner verbally of all the provisions of subsection (a) of this Section which were required to be included in the notice. Where the inspection is based upon a complaint or probable cause, a written notice of intent under this Section shall not be required.
In cases of emergency where extreme hazards are known to exist which may involve the loss of life or severe property damage, the limitations of this Section shall not apply.
The Chief, or duly authorized representative, shall have the right of entry upon real property while in the discharge of his duties in removing, terminating or abating a public nuisance under this Chapter.
(Ord. 96-458-297, § 1; Ord. 2006-1363-E, § 4; Ord. 2008-149-E, § 1)
Ordinance 2007-839-E, § 18, authorized updated department/division names pursuant to reorganization.
As you can see, it gives wide powers to the "chief", which is, for this purpose, defined as the chief or her representative, to enter a building. What stops them from just walking right on in whenever they want, which is what the codes says they can do, is property rights. The state level on up stops them. Locally, per this chapter, if MCCD thinks you are violation of a code, you have no property rights. Thankfully, they can not enter without your express permission unless they get a judge to agree that they must enter for the sake of public safety. I suspect that is harder to do than MCCD likes.
Sec. 518.136. - Unlawful to occupy.
It shall be a Class C offense, as defined in Section 632.101, Ordinance Code, to be physically present in or to allow others to be physically present in any building or structure which has been condemned pursuant to this chapter until such building has been made to comply in every respect with the order and notice of violation issued pursuant to the condemnation or unless such individual has obtained prior written authorization from the Chief or his or her designee to be inside the building or structure for the express purpose of rectifying the deficiencies outlined in the order and notice of violation. All written authorizations shall be posted on site at all times during permitted corrective actions. The failure to post such written authorization shall be a Class C offense.
(Ord. 96-458-297, § 1; Ord. 2006-590-E, § 2)
They seem to contradict themselves a bit here. Yes, they say you must get permission from MCCD to enter your own house, but they label the section "Unlawful to Occupy" which is much different than what the paragraph talks about. To enter to do the work is not to occupy, at least not as normally defined for code purposes. Like the section quoted above, this section takes away one's property rights. If one section cannot be enforced, by their own admission, then the other can not be enforced either. Or at least one would think. I would think that if it was written that you could not be in your property except to remedy the issues, then it would be a legal code, As it is, it seems to tramp all over property rights. Last I check, we still have some of those in this country, don't we? As a side note, Jason Teal was overheard telling someone that this part of the code was actually directed to be able to keep "street" people out. However, as in many cases, it was badly written and so it it being used to keep everyone out. Even if you are simply trying to do what MCCD itself has said they want you to do.
It seems like code is sort of playing with a stacked deck and even though we know it, we can't seem to get them ejected from the game for it.