How did the success of the civil rights movement and abolishment of slavery open doors to the election of the first Black American President of the United States, Barack Obama?

I don't know how to answer this! PLEASE HELP ASAP!

Have your studies indicated any impediments for an African-American man to be elected president before the abolition of slavery? Any prohibitions in Jim Crow South after the Civil War? Any discouragement from attaining the nomination of a major party? Were African Americans running for president before the Civil Rights Movement? Could they even vote? If you have not studied any of these eras or issues, I'll be glad to offer some links that might help.