The Code 7-10 was only triggered by the Enterprise's attempts to communicate. So it still boggles the mind that they don't make exceptions when a vessel that isn't their own wanders into their system.
I do agree that the Federation has never respected the borders and wishes of other powers. It's a theme that runs through the entire franchise.
Kirk was in the right all the way up to the point he destroyed the Eminians ability to play their game. At that point, neither him, his landing party, Ambassador Fox or the Enterprise were in any real danger. It makes the audience all warm and fuzzy inside (me included) but it represents one of the few times in the series that I thought Kirk was flat wrong.