The passage of the Black Codes in many southern states enraged both northerners and African Americans across the country. In response, Congress passed the Civil Rights Act over president Andrew Johnson's veto as well as the Reconstruction Act of 1867. These acts effectively outlawed discrimination on basis of race and granted equal rights to all under the Constitution. They also guaranteed that a citizen's right to vote could not be denied "on account of race, color, or previous condition of servitude." All of these actions effectively invalidated the Black Codes. However, the road to reconstruction was still a long and rocky one.