But never the Supreme Court. As Chief Justice Rehnquist noted in 1996: "The provision of the Constitution dealing with habeas corpus is found in Article I, dealing with the legislative power vested in Congress, and provides that the writ of habeas corpus shall not be suspended unless in time of war or rebellion the public safety shall require it. The question of whether only Congress may suspend it has never been authoritatively answered to this day, but the Lincoln Administration proceeded to arrest and detain persons suspected of disloyal activities."
Rehnquist must have changed his mind by 2004.
...We have long since made clear that a state of war is not a blank check for the President when it comes to the rights of the Nation's citizens. Whatever power the United States Constitution envisions for the Executive in its exchanges with other nations or with enemy organizations in times of conflict, it most assuredly envisions a role for all three branches when individual liberties are at stake. Likewise, we have made clear that, unless Congress acts to suspend it, the Great Writ of habeas corpus allows the Judicial Branch to play a necessary role in maintaining this delicate balance of governance, serving as an important judicial check on the Executive's discretion in the realm of detentions. See INS v. St. Cyr, ("At its historical core, the writ of habeas corpus has served as a means of reviewing the legality of Executive detention, and it is in that context that its protections have been strongest"). Thus, while we do not question that our due process assessment must pay keen attention to the particular burdens faced by the Executive in the context of military action, it would turn our system of checks and balances on its head to suggest that a citizen could not make his way to court with a challenge to the factual basis for his detention by his government, simply because the Executive opposes making available such a challenge. Absent suspension of the writ by Congress, a citizen detained as an enemy combatant is entitled to this process." - O'Connor, joined by Kennedy, Bryer, and Rehnquist for the majority in Hamdi v. Rumsfeld (2004)