New York's top court on Tuesday blocked efforts to shine a light on the records of cops who misbehave on duty.

New York's State Civil Rights Law has a section (50-a) that broadly seals the personnel records of police, corrections officers, and firefighters, even in cases of misconduct. As a result, whenever a police officer gets in trouble, citizens can't know if he or she has been disciplined, and are unable to determine whether an officer has a history of bad behavior.

For the last six years, the New York Civil Liberties Union has been fighting for access to the records of officers brought before New York City's Civilian Complaint Review Board. Initially, the NYCLU won an order for the police to release the information in a redacted format. But it was overturned on an appeal that was upheld Tuesday.

The judge who wrote Tuesday's decision, Michael Garcia, made very clear that the purpose of the law is to shield police from not just "harassment," but embarrassment, and to make it harder to use an officer's disciplinary record to undermine his or her testimony.

Garcia detailed several New York state precedents, one of which states the purpose of section 50-a is to protect police against those who would use their records "as a means for harassment and reprisals and for purposes of cross-examination by plaintiff's counsel during litigation." The law is designed not just to protect the police officer's privacy, but also their reputation and to shield them from legal liability.

The law does have a mechanism by which this seal of privacy can be broken, but it requires a judge to review requests individually and to then determine that the records are "relevant" to a specific action.

We've seen the outcome of this practice in the case of Eric Garner, who died after a NYPD police officer saw Garner selling loose cigarettes and put him in a chokehold. The personnel records of the officer responsible, Daniel Pantaleo, were kept secret under this state law, but somebody leaked documents to the press that showed a history of problems, including four abuse complaints that were substantiated by the NYC Civilian Complaint Review Board.

Pantaleo will finally face an administrative trial next year. The Garner case, meanwhile, has become not just a symbol of police brutality, but a reminder of how little members of the public can know about the armed men and women who have the legal authority to kill them.

Law enforcement unions are, of course, over the moon about the decision. Michael Palladino, the president of the Detectives' Endowment Association, told The New York Times the decision was "exhilarating, especially in this climate." This "climate" is not actually any more prone to violent retaliation against police than it has been in the past. Of the 140 deaths of law enforcement officers reported this year, 49 were due to gunfire, three to assault, and seven to vehicular assault. All of 10 police officers have died in service in New York State this year, several of them as a result of 9/11-related illnesses.

Perhaps Palladino is referring to the "climate" in California, where lawmakers this year finally stripped law enforcement officers of similarly overbroad "protections" that prevented the public from knowing about officers' past misconduct. Lawmakers in New York are hoping to follow in California's footsteps and open up these records next year.

Read the ruling here.