Federation Judicial Code
The Federation Judicial Code, also known as the Federation Legal Code, was a set of guidelines and regulations related to Federation law.

It read, in part:
FEDERATION JUDICIAL CODE 21.0061
FEDERATION LEGAL CODE, ORDER 104
RE: COMMAND POSTING PRECEDENTS
Accessing
• ORDER 104, SECTION B: Starfleet order that deals with chain of command. Commodore Matt Decker quoted regulation 104-B to Spock when taking command of the Enterprise in 2267.
• ORDER 104, SECTION C:  Starfleet regulation states that the Chief Medical Officer may relieve a commander of duty if he or she is mentally or physically hurt.  Precedent:  C. Stocker, a Starfleet officer who assumed command of Starbase 10 in 2267.  Stocker was transported to the post aboard the starship Enterprise.  While en route, several Enterprise personnel became ill with a radiation induced hyperaccelerated aging disease. Fearing the loss of these officers, Stocker assumed command of the Enterprise.

Order 104 in the Federation Judicial Code refers to precedents in command postings, with Section B describing an event from the ; and Section C described the regulation in which a chief medical officer could relieve a commanding officer if they deemed the officer to be unfit for duty. (; cf. )  

In 2376, Captain Kathryn Janeway reviewed the legal precedents in Federation law for granting command positions to holograms, in her consideration of upgrading The Doctor to be an ECH. At that time, however, there weren't any precedents on the matter for her to regard. ( okudagram)

Captain Kathryn Janeway reviewed the Judicial Code again when some of her crewmembers were held captive aboard a Borg cube in 2376. ()

External link

Legal documents
Federation