A federal court has ruled the Alabama Department of Corrections has and is violating the eighth amendment rights for proper mental health care for its inmates.