According to Section 50-a of New York’s civil rights law, the disciplinary history of a police officer is “confidential and not subject to inspection or review.” That means the public that pays officers has no right to know when those cops misbehave, or the results of any disciplinary process when they cross the line.

It has to be amended.

An intricate argument is playing out over that law in New York City. In 2015, a state Supreme Court judge ordered the city to release to the Legal Aid Society information about the number, just the number, of past complaints against Officer Daniel Pantaleo that were substantiated by the city’s Civilian Complaint Review Board, and any disciplinary action that was recommended. Pantaleo is the officer who put an apparent chokehold on Eric Garner in 2014. The Staten Island man died, but a grand jury there declined to indict Pantaleo. The city settled a civil case with the Garner family for $5.9 million.

The judge who ordered the information released wisely ruled Section 50-a did not apply to such a narrow request, and pointed out that the CCRB had regularly given out such information to lawyers in the past. Unfortunately, the city has appealed. And it’s just one area in which the city has recently restricted the information it gives out.

Last month, the NYPD ended its long-standing routine of posting the outcome of certain personnel changes and retirements that included disciplinary actions. For all the years the city shared this information, it apparently did not cause cops to be harassed, as police unions argue it would.

In the outrage over Garner’s death, it’s easy to focus on the wording of 50-a and take sides over exactly what should be revealed. That’s what the courts are doing. What state legislators and Gov. Andrew Cuomo need to do is reform 50-a so the public has confidence that cops who do wrong are held accountable. Had onlookers not filmed the confrontation between Garner and Pantaleo, we might not have found out much about that incident, either. Mayor Bill de Blasio says 50-a needs to change. The question is how much effort he’ll put into a crusade that would generate ferocious opposition from officers and their unions.