^ I wholeheartedly agree, in both the Decker and Stocker situations.
I would suggest that both commodores went out on a limb by taking command of the Enterprise, competency not withstanding.
It looks more like the commodores have rights in the regulations that specifically gives them the option to take command. So it doesn't seem to matter which navy Star Trek borrows from as the episodes were specific enough to identify how the commodores took command.
"The Doomsday Machine"-
DECKER: Mister Spock, I'm officially notifying you that I'm exercising
my option under regulations as a Starfleet Commodore, and that I am assuming command of the Enterprise.
SPOCK: You have the right to do so, but I would advise against it.
...
SPOCK: Unfortunately, Starfleet Order 104, Section B, leaves me no alternative. Paragraph 1A clearly states
...
SPOCK: If you can certify Commodore Decker medically or psychologically unfit for command, I can relieve him under Section C.
but in "The Deadly Years", Stocker takes command for a different reason under the regulations: the incapacitation of the senior officers...
STOCKER: I would like you to take over command of the Enterprise.
SPOCK: On what grounds, Commodore?
STOCKER:
On the grounds that the captain, because of his affliction, is unable to perform his duties.
...
STOCKER: Mister Spock. I do not like what I'm about to say but
regulations demand it. And as a Starfleet flag officer, I must follow regulations. As second in command of the Enterprise, you must convene an extraordinary competency hearing.
SPOCK: I resist that suggestion, Commodore.
STOCKER: It's not a matter of choice.
When a captain is unfit, physically or mentally, a competency hearing is mandatory. Please don't make me quote a regulation which you know as well as I do.
SPOCK: Very well, sir. The hearing shall convene at fourteen hundred hours.
...
STOCKER:
Well, since the senior officers are incapable and I am of flag rank, I am forced by regulations to assume command.
SPOCK: Sir, you have never commanded a starship.
and in "The Galileo Seven", Ferris is given the authority under regulations to make his mission priority.
FERRIS: Very well, Captain, but not one second beyond that moment. Is that clear? If it isn't, I suggest you look at book
nineteen, section four thirty three, paragraph twelve.
KIRK: I'm familiar with the regulations, Commissioner. I know all about your authority. Launch shuttlecraft Columbus.