Unions argued that posting unproven or false complaints could sully officers’ reputations and compromise their safety