There was no such law passed. There were Black, Brown, Red, and Yellow men in the Confederate Army.
"In the fullest sense, any man in the military service who receives pay, whether sworn in or not, is a soldier, because he is subject to military law. Under this general head, laborers, teamsters, sutlers, chaplains, &c. are soldiers. In a more limited sense, a private soldier is a man enlisted in the military service to serve in the cavalry, artillery, or infantry. He is said to be enlisted when he has been examined, his duties of obedience explained to him, and after he has taken the prescribed oath"..........General August Kautz's, USA,"Customs of Service, for Non-Commissioned Officers and Soldiers" (1864), page. 11