Question: Who was the president that signed the legislation that gave the freedom to the court to rule the way it ruled in the Dred Scott Decision?

Context articles: Dred Scott v. Sandford
Missouri Compromise
Dred Scott
Taney Court
Golden Circle (proposed country)
Freeport Doctrine
Hamilton Rowan Gamble
Don E. Fehrenbacher
Robert Cooper Grier
William Scott (Missouri)

Dred Scott v. Sandford, 60 U.S. 393 (1857) , also known simply as the Dred Scott case, was a landmark decision by the United States Supreme Court on US labor law and constitutional law.
 It held that "a negro, whose ancestors were imported into [the U.S.], and sold as slaves", whether enslaved or free, could not be an American citizen and therefore had no standing to sue in federal court, and that the federal government had no power to regulate slavery in the federal territories acquired after the creation of the United States.
 Dred Scott, an enslaved man of "the negro African race" who had been taken by his owners to free states and territories, attempted to sue for his freedom.
 In a 7–2 decision written by Chief Justice Roger B. Taney, the court denied Scott's request.
 The decision was only the second time that the Supreme Court had ruled an Act of Congress to be unconstitutional.
The Missouri Compromise is the title generally attached to the legislation passed by the 16th United States Congress on May 8, 1820.
 The measures provided for the admission of Maine as a state along with Missouri as a slave state, thus maintaining the balance of power between North and South.
 As part of the compromise, slavery was prohibited North of the 36°30′ parallel, excluding Missouri.
 President James Monroe signed the legislation on April 6, 1820.
Dred Scott (c. 1799 – September 17, 1858) was an enslaved African American man in the United States who unsuccessfully sued for his freedom and that of his wife and their two daughters in the "Dred Scott v. Sandford" case of 1857, popularly known as the "Dred Scott Decision".
 Scott claimed that he and his wife should be granted their freedom because they had lived in Illinois and the Wisconsin Territory for four years, where slavery was illegal.
 The United States Supreme Court decided 7–2 against Scott, finding that neither he nor any other person of African ancestry could claim citizenship in the United States, and therefore Scott could not bring suit in federal court under diversity of citizenship rules.
 Moreover, Scott's temporary residence outside Missouri did not bring about his emancipation under the Missouri Compromise, which the court ruled unconstitutional as it would "improperly deprive Scott's owner of his legal property".
The Taney Court refers to the Supreme Court of the United States from 1836 to 1864, when Roger Taney served as the fifth Chief Justice of the United States.
 Taney succeeded John Marshall as Chief Justice after Marshall's death in 1835.
 Taney served as Chief Justice until his death in 1864, at which point Salmon P. Chase took office.
 Taney had been an important member of Andrew Jackson's administration, an advocate of Jacksonian democracy, and had played a major role in the Bank War, during which Taney wrote a memo questioning the Supreme Court's power of judicial review.
 However, the Taney Court did not strongly break from the decisions and precedents of the Marshall Court, as it continued to uphold a strong federal government with an independent judiciary.
 Most of the Taney Court's holdings are overshadowed by the "Dred Scott" decision, in which the court ruled that African-Americans could not be citizens. However, the Taney Court's decisions regarding economic issues and separation of powers set important precedents, and the Taney Court has been lauded for its ability to adapt regulatory law to a country undergoing remarkable technological and economic progress.
The Golden Circle (Spanish: "Círculo Dorado" ) was an unrealized 1850s proposal by the Knights of the Golden Circle to expand the number of slave states.
 It envisioned the annexation of several areas—Mexico, Central America, northern South America, Cuba, and the rest of the Caribbean—into the United States in order to vastly increase the number of slave states (it was proposed that Mexico alone be divided into 25 new slave states) and thus the power of the slave holding Southern upper classes.
 After the Dred Scott Decision (1857) increased anti-slavery agitation, it was advocated by the Knights of the Golden Circle that the Southern United States should secede in their own confederation and invade and annex the area of the golden circle to vastly expand the power of the South.
The Freeport Doctrine was articulated by Stephen A. Douglas at the second of the Lincoln-Douglas debates on August 27, 1858, in Freeport, Illinois.
 Former one-term U.S. Representative Abraham Lincoln was campaigning to take Douglas' U.S. Senate seat by strongly opposing all attempts to expand the geographic area in which slavery was practiced.
 Lincoln tried to force Douglas to choose between the principle of popular sovereignty proposed by the Kansas-Nebraska Act (which left the fate of slavery in a U.S. territory up to its inhabitants), and the majority decision of the United States Supreme Court in the case of "Dred Scott v. Sandford", which stated that slavery could not legally be excluded from U.S. territories (since Douglas professed great respect for Supreme Court decisions, and accused the Republicans of disrespecting the court, yet this aspect of the "Dred Scott" decision was contrary to Douglas' views and politically unpopular in Illinois).
 Instead of making a direct choice, Douglas' response stated that despite the court's ruling, slavery could be prevented from any territory by the refusal of the people living in that territory to pass laws favorable to slavery.
 Likewise, if the people of the territory supported slavery, legislation would provide for its continued existence.
Hamilton Rowan Gamble (November 29, 1798 – January 31, 1864) was an American jurist and politician who served as the Chief Justice of the Missouri Supreme Court at the time of the Dred Scott Decision in 1852, writing a dissenting opinion when his colleagues voted to overturn the 28-year precedent in Missouri of "once free always free".
 During the American Civil War, he was appointed as the Governor of Missouri by a Constitutional Convention after Union forces captured the state capital at Jefferson City and deposed the elected governor.
Don Edward Fehrenbacher (August 21, 1920 in Sterling, Illinois – December 13, 1997 in Palo Alto, California) was an American historian.
 He wrote on politics, slavery, and Abraham Lincoln.
 He won the 1979 Pulitzer Prize for History for "", his book about the Dred Scott Decision.
 In 1977 David M. Potter's "The Impending Crisis, 1848-1861", which he edited and completed, won the Pulitzer Prize.
 In 1997 he won the Lincoln Prize.
Robert Cooper Grier (March 5, 1794 – September 25, 1870), was an American jurist who served on the Supreme Court of the United States.
 A Jacksonian Democrat from Pennsylvania who served from 1846 to 1870, Grier weighed in on some of the most important cases of the 19th century.
 As a rare Northern member of the majority in the infamous 1857 Dred Scott decision, Grier concurred that African Americans were not—and were never meant to be—citizens of the United States and that the property rights of slaveholders were clearly protected in the Constitution.
 However, Grier wrote the majority opinion in the 1863 Prize Cases, upholding Abraham Lincoln’s presidential power to institute Union blockades of Confederate ports and giving the Union Army a strategic advantage in the American Civil War.
William Scott (June 7, 1804 – 1862) was an American lawyer and judge who served on the Supreme Court of Missouri from 1841 to 1849 and from 1851 to 1862.
 He also served on the Jefferson City Circuit Court.
 Justice Scott was the author of the majority opinion in "Scott v. Emerson", 15 Missouri 572 (1852), which was part of the "Dred Scott v. Sandford" case.
 Scott's opinion, which overturned well-established precedent in Missouri, set the stage for Dred Scott's case in the Supreme Court.