No peace officer of any municipality or county may be discharged, subject to disciplinary action, or threatened with discharge or disciplinary action as retaliation for or solely by reason of the peace officer's exercise of his or her rights provided in section 17-107, 17-208, or 23-1734 or sections 13-3001 to 13-3004. This section does not apply to any municipality or county accredited through the Commission on Accreditation for Law Enforcement Agencies.