Over the summer, a still from a surveillance camera showing a police officer kicking a handcuffed woman in the head went viral on Facebook and email. The text below the picture read, "Rhode Island police officer Edward Krawetz received no jail time for this brutal assault on this seated and handcuffed woman. Now he wants his job back. Share if you don't want this to happen." The allegation was wild enough to pique the interest of the rumor-debunking site Snopes.com, which determined that the story was, in fact, true.

In 2009, Officer Edward Krawetz of the Lincoln Police Department arrested Donna Levesque for unruly behavior at a casino in Lincoln, Rhode Island. While seated on the ground with her hands cuffed behind her, Levesque kicked Krawetz in the shin. Krawetz responded by cocking back his right leg and nailing Levesque in the side of the head, knocking her over. In March 2012, Krawetz was convicted of felony battery despite his claim that he kicked Levesque in "self defense." The 10-year sentence he received was immediately suspended, and Krawetz was ordered to attend anger management classes.

But he wasn't fired from the Lincoln Police Department. Under Rhode Island law, the fate of Krawetz's job as a cop rested not with a criminal court, or even his commanding officer, but in the hands of a three-person panel composed of fellow police officers—one of whom Krawetz would get to choose. That panel would conduct the investigation into Krawetz's behavior, oversee a cross-examination, and judge whether Krawetz could keep his job. The entire incident, in other words, would be kept in the family.

The same was true for Rhode Island Police Officer Alfred Ferretti after he followed two women home while in uniform and exposed himself; for Officers Robert Neri and Robert Lobianco after they were found having a threesome while on duty; and for Officer Nichalas Laprade after two women reported that he stared at them while masturbating as he drove down I-95 in his personal vehicle.

All of these Rhode Island cops, and many more like them across the county, were able to keep their jobs and benefits—sometimes only temporarily, but always longer than they should have—thanks to model legislation written and lobbied for by well-funded police unions. That piece of legislation is called the "law enforcement bill of rights," and its sole purpose is to shield cops from the laws they're paid to enforce.

The inspiration for this legislation and its similarly named cousins across the country is the Police Officers' Bill of Rights, introduced in 1971 by New York Rep. Mario Biaggi (D), at the behest of the Police Benevolent Association. Having once been the most decorated police officer in the country, Biaggi didn't need much convincing to put forward the union-friendly bill.

Biaggi pushed for the POBOR until March 1987, when he received two indictments back-to-back. The first was for accepting a paid vacation from Brooklyn Democratic Leader Meade H. Esposito in exchange for using federal funds to bail out a company in Esposito's neighborhood. A second indictment handed down three months later charged Biaggi with extorting $3.6 million in cash and stock options from a small Bronx machine shop called Wedtech. Both charges resulted in convictions and Biaggi's resignation from Congress.

While Biaggi's bill never made it through Congress, police unions didn't wait for city managers or police department higher-ups to write their own. Benevolent associations in Maryland successfully pushed for the passage of a police bill of rights in 1972; Florida, Rhode Island, Virginia, New Mexico, and California followed suit before the 70s were over. The 1980s, 90s, and 2000s saw still more states adopt police bill of rights at the behest of police unions.

The rights created by these bills differ from state to state, but here's how a typical police misconduct investigation works in states that have a law enforcement bill of rights in place:

A complaint is filed against an officer by a member of the public or a fellow officer. Police department leadership reviews the complaint and decides whether to investigate. If the department decides to pursue the complaint, it must inform the officer and his union. That's where the special treatment begins, but it doesn't end there.

Unlike a member of the public, the officer gets a "cooling off" period before he has to respond to any questions. Unlike a member of the public, the officer under investigation is privy to the names of his complainants and their testimony against him before he is ever interrogated. Unlike a member of the public, the officer under investigation is to be interrogated "at a reasonable hour," with a union member present. Unlike a member of the public, the officer can only be questioned by one person during his interrogation. Unlike a member of the public, the officer can be interrogated only "for reasonable periods," which "shall be timed to allow for such personal necessities and rest periods as are reasonably necessary." Unlike a member of the public, the officer under investigation cannot be "threatened with disciplinary action" at any point during his interrogation. If he is threatened with punishment, whatever he says following the threat cannot be used against him.

What happens after the interrogation again varies from state to state. But under nearly every law enforcement bill of rights, the following additional privileges are granted to officers: Their departments cannot publicly acknowledge that the officer is under investigation; if the officer is cleared of wrongdoing or the charges are dropped, the department may not publicly acknowledge that the investigation ever took place, or reveal the nature of the complaint. The officer cannot be questioned or investigated by "non-government agents," which means no civilian review boards. If the officer is suspended as a result of the investigation, he must continue to receive full pay and benefits until his case is resolved. In most states, the charging department must subsidize the accused officer's legal defense.

A violation of any of the above rights can result in dismissal—not of the officer, but of the charges against him.

Because of these special due process privileges, there's little incentive for police departments to discipline officers. In most cases, it's more financially prudent to let a District Attorney or outside law enforcement agency do the heavy lifting, and then fire the officer if he's convicted. This is the only "easy" way, under police bills of rights, for departments to get rid of bad cops–which essentially means the only way to get rid of bad cops is if some other law enforcement agency can make a felony charge stick. This is the biggest problem with law enforcement bills of rights–they encourage police departments to let external forces determine what behavior is unacceptable. That's eventually why Rhode Island's Krawetz resigned his post.

But Rhode Island is by no means an outlier.

In the last year, a Florida narcotics detective was charged with a slew of crimes ranging from rape and torture, to embezzlement and forgery; a Virginia police officer shot a retired Sunday school teacher in the back of the head and throat as she drove out of a church parking lot; six California cops beat a homeless man into a life-ending coma; a Milwaukee police officer was arrested for sodomizing suspects; a drunk man slapped a Philadelphia cop, and the cop responded by beating the drunk man's face bloody with his baton.

What do they all have in common? They were all known by their colleagues and employers to be bad cops long before they came to the public's attention.

Major Joseph Floyd was a problem cop at departments across Florida before beginning his two-year reign of terror in Crestview, Florida. Daniel Harmon-Wright was hired at the Culpeper Police Department despite a known drinking problem, and kept on the force despite complaints that he illegally entered a home and threatened its residents at gunpoint. At least one of the Fullerton PD officers who beat Kelly Thomas into a coma from which he never woke was accused of brutality the year before. Michael Vagnini's superiors in Milwaukee knew "for a couple years" that he'd been conducting illegal rectal searches. Before William J. Gress beat a drunk and unruly Oktoberfest reveler, he broke a woman's nose and spat on her outside a restaurant.

Additionally, all of those officers were working in states with a law enforcement bill of rights, and when they were all eventually disciplined, it was by a law enforcement agency other than the one they worked for.

While it's possible—maybe even likely, depending on the department—that these officers would have faced no internal discipline even if their states did not have law enforcement bills of rights, such laws discourage discipline and make it nearly impossible for the public to hold bad cops accountable.