Not sure the determining issue is Civil Rights, versus SCOTUS long policy of deference in matters pertaning to the discipline and functioning of the armed forces.
See for instance Steven B. Lichtman,The Justices and the Generals: A Critical Examination of the U.S. Supreme Court’s Tradition of Deference to the Military,1918-2004, 65 Md. L. Rev. 907 (2006)
And its available on line. https://core.ac.uk/download/pdf/56357804.pdf