Here we are. More than 10 years after the 9/11 attacks, more than six months since the killing of Osama bin Laden and less than a year away from the next presidential election, Barack Obama is about to sign into law the National Defence Authorisation Act (NDAA). It authorises the indefinite detention in military custody of US citizens who are suspected of having "substantially supported" al-Qaida, the Taliban or "associated forces" – and makes such detention mandatory for foreign nationals who are accused of having links to al-Qaida.

In fact, say civil liberties lawyers and human rights groups, this pernicious and Orwellian piece of legislation doesn't only enshrine in US law (in sections 1021 and 1022) indefinite military imprisonment without trial for terror suspects, but also makes it much easier for the government to transfer – or "render" – US citizens to foreign regimes for interrogation or incarceration, (also section 1021) and much more difficult to close the prison camp at Guantánamo Bay(sections 1023, 1026, 1027, and 1028).

Obama and the Democrats have a great deal to answer for. This brazen militarisation of US civilian justice and law enforcement cannot just be laid at the door of dastardly Republicans in Congress. In the Senate, the bill was co-sponsored by a Democratic senator, Carl Levin; in the House of Representatives, it sailed through with the support of 93 Democrats, including the minority leader, Nancy Pelosi (despite being opposed by, among others, the directors of the FBI and the CIA, the attorney general and the defence secretary).

The president has the power to veto the bill and, initially, his aides had suggested he would do so. However, citing vague "changes" to the language of the bill, Obama – the most veto-shy president since James Garfield in the 1880s – made a U-turn this month and withdrew his veto threat in what a New York Times editorial called "a complete political cave-in, one that reinforces the impression of a fumbling presidency".

But this isn't about the president's political incompetence or abject weakness. It is, above all, yet another example of Obama's refusal to stand up for civil liberties and the rule of law. Over the past three years, the former constitutional law professor has failed to close Guantánamo Bay, expanded the detention facility at Bagram airbase in Afghanistan, defended the use of warrantless surveillance and military tribunals, and – shockingly – asserted the right to assassinate, via drone strike and without due process, US citizens he deems to be terrorists. As the leading US legal scholar Jonathan Turley has argued, "the election of Barack Obama may stand as one of the single most devastating events in our history for civil liberties".

It is hard not to like or admire Obama as a person: the president is intelligent, reasonable, eloquent and witty. But presidents should be judged on their policies, not personalities; their records, not their rhetoric. Obama, however, has been handed a pass on indefinite military detention by the same liberals, progressives and Democrats who were so outraged and disgusted by the Bush administration's much milder Patriot Act. Liberals have to ask themselves: do civil liberties and human rights only matter when a Republican is sitting in the Oval Office?

A few weeks ago, at a private dinner, I was assailed by a senior state department official for echoing Turley's critique of the president and for daring to compare Obama to his Republican predecessor. In fact, I now regret saying Obama was similar to Bush. When it comes to civil liberties, once he signs the NDAA into law, he will be worse.