Just because you can doesn’t mean you should. That age-old advice about the distinction between freedom and wisdom came to mind as I read the ruling that requires the White House to reissue media credentials to CNN blowhard Jim Acosta.

Federal Judge Timothy Kelly said Acosta must be allowed to return because there was no due process in the decision to suspend him. Kelly, appointed by President Trump, emphasized he wasn’t ruling on the merits of the suspension or Acosta’s behavior, only the process.

“I have not determined that the First Amendment was violated here,” he wrote, adding that the White House has no obligation to call on Acosta for questions.

While the outcome is a setback for Trump, it is also sensible and points the way forward. The president responded by saying his team will draw up rules requiring “decorum” and standards of behavior, and predicts ultimate victory.

Actually, he’s already won something bigger than the case at hand. He’s established the principle that a press pass is not a license to lecture and hector the president while refusing to yield the microphone, all of which Acosta did.

The principle is so obvious it shouldn’t need to be clarified, but written rules are necessary because Acosta abused his privilege. Now the details of the rules must be spelled out to cover any future cases.

But there won’t be any future cases — if the press corps get its act together. The White House Correspondents’ Association must find the courage to police the bad apples in its ranks instead of waiting for the government to act, then running to the courts for protection.

Recall that Acosta got the boot because he was the rudest and most aggressive lout in the room, but was not alone in trashing decorum. For two years, members of the Trump-hating press have used televised briefings and press conferences as a stage to let the world know how they feel about the president.

While most reporters ask real questions, even pointed ones, Acosta and his ilk are engaged in a performance art that amounts to virtue signaling to their bosses and colleagues.

“Look at me,” they seem to say. “I’m fighting back.”

But it’s not the job of reporters to fight back. Theirs is to gather information, fairly and accurately, and let readers and viewers decide what to do with it.

I know how quaint that sounds. But following that tried-and-true formula is how the media built its credibility. The abandonment of decorum is part of the abandonment of standards and is destroying public trust.

This was hardly the first time Acosta starred in his own drama. Over and over, he makes himself the story, which is not appealing, even for some anti-Trumpers.

Indeed, the response to my column supporting the initial suspension reveals that Americans on both sides of the Trump line believe manners still matter. They differ over who is at fault, with Trump supporters seeing most journalists as Democrats with press passes, while Acosta supporters mostly argue he was justified in behaving badly because Trump does, too.

As reader Dave Druten put it, “Respecting a president is preferred conduct, but kowtowing to a proven liar is not proper journalism. You need to address the root of the problem and not the symptoms of disrespect it has spawned.”

Reader Deanne Payne offers yet another view, saying that, although she is not a Trump supporter, she is disturbed by media bias and the lack of professionalism. “I am a nurse and I care for people of all walks of life and my biases, as part of my job, have to be checked at the door,” she writes. “The approach by many in the media is undignified and disgraceful.”

Payne is on to something, both in moral and practical terms. The idea of using someone else’s conduct to justify your misconduct is childish. Go to any playground and you’ll hear a chorus of “he started it” defenses.

It’s simply laughable when adults use that lame excuse, which is what Acosta and his defenders are doing.

As for the practical fallout, there are good reasons why trust of the press is at an all-time low. The 2016 election was in part a referendum on the elite media’s disdain for Trump and his supporters.

For many of them, conduct like Acosta’s confirms Trump’s “fake news” charges because they see in him the kind of journalist they do not trust to tell the truth. And with surveys consistently showing 90 percent of presidential coverage is negative, it is hard to fault their conclusion.

Besides, the president, like all Americans, enjoys First Amendment rights, and nothing in the oath of office requires him to suffer an unfair beating in silence.

Still, instead of engaging in endless combat with press-pass partisans, Trump has other options. He could bar cameras at the daily briefings and without a TV audience, the Acosta types would be unlikely to don their Superman capes.

Trump could also reduce the frequency of the briefings or cancel them entirely. He could substitute more one-on-one interviews for press conferences. He could, in fact, shun the media altogether because none of these traditions of contact are fundamental or even tangential to freedom of the press.

The First Amendment is a key to American liberty in glorious ways, but it is not an excuse for bad manners. It is a tragedy of our era that the media must be reminded of that common-sense truth.

The ‘fix’ is out at NYCHA

Hell, no! That’s the gist of a gutsy ruling by a federal judge who threw out a dopey agreement covering repairs and oversight for the city’s beleaguered Housing Authority.

Judge William Pauley said the deal between federal prosecutors and City Hall was unworkable and unprecedented because it would involve court “usurpation” of government duties. He hinted earlier he didn’t believe a monitor, which he would have to appoint, would yield the desperately needed fixes.

It’s also not clear why prosecutors inserted themselves in a settlement, as if they are experts in property management. Moreover, city officials had falsely sworn for years that they made lead-paint inspections, a pattern of potential criminality the feds shouldn’t ignore.

Of course, Pauley’s ruling doesn’t fix leaky roofs or bad plumbing. But it removes the fiction that the proposed settlement was the solution and puts the onus back on City Hall and Albany — where it belongs.

Single-payer for NY? Ho, ho, no!

With Democrats seizing both houses of the state Legislature, Gov. Cuomo might be expected to play Santa Claus. Instead, he wants to stop the Medicare-for-all bandwagon.

“I have a lot of great ideas for Christmas gifts that I want, but then I have to deal with the reality of the costs,” he said on public radio.

Cuomo said switching to single-payer would mean doubling the state’s $170 billion budget. Yikes.

Good luck to him convincing the far left that money doesn’t grow on trees.