Following the Chesapeake–Leopard affair in 1807, President Thomas Jefferson signed the Embargo Act, which "expressly granted discretion to the state port collectors to detain any ship that appeared to be violating, or attempting to violate, the embargo." In 1808, shipowner Adam Gilchrist filed a mandamus action with the circuit court after his ship was detained following the direction of Secretary of Treasury Albert Gallatin. In "Gilchrist v. Collector of Charleston" (1808), Johnson, presiding over the court, ruled that "the collector’s actions would not be justified by Gallatin’s letter because in the embargo act Congress did not sanction the President (or the Department of Treasury) with the discretion to detain ships."