California Harbors and Navigation Code Section 801
CA Harb & Nav Code § 801 (2017)
The master of a vessel shall be always on board when it is entering or leaving a port, harbor, or river unless the vessel is in charge of a mate who possesses a master’s license.