The ruling comes as scrutiny over the conditions inside immigrant detention centers in the Trump administration continues to mount.