§ 50-a. Personnel records of police officers, firefighters and correction officers. 1. All personnel records used to evaluate performance toward continued employment or promotion, under the control of any police agency or department of the state or any political subdivision thereof including authorities or agencies maintaining police forces of individuals defined as police officers in section 1.20 of the criminal procedure law and such personnel records under the control of a sheriff's department or a department of correction of individuals employed as correction officers and such personnel records under the control of a paid fire department or force of individuals employed as firefighters or firefighter/paramedics and such personnel records under the control of the department of corrections and community supervision for individuals defined as peace officers pursuant to subdivisions twenty-three and twenty-three-a of section 2.10 of the criminal procedure law and such personnel records under the control of a probation department for individuals defined as peace officers pursuant to subdivision twenty-four of section 2.10 of the criminal procedure law shall be considered confidential and not subject to inspection or review without the express written consent of such police officer, firefighter, firefighter/paramedic, correction officer or peace officer within the department of corrections and community supervision or probation department except as may be mandated by lawful court order.
2. Prior to issuing such court order the judge must review all such requests and give interested parties the opportunity to be heard. No such order shall issue without a clear showing of facts sufficient to warrant the judge to request records for review.
3. If, after such hearing, the judge concludes there is a sufficient basis he shall sign an order requiring that the personnel records in question be sealed and sent directly to him. He shall then review the file and make a determination as to whether the records are relevant and material in the action before him. Upon such a finding the court shall make those parts of the record found to be relevant and material available to the persons so requesting.
4. The provisions of this section shall not apply to any district attorney or his assistants, the attorney general or his deputies or assistants, a county attorney or his deputies or assistants, a corporation counsel or his deputies or assistants, a town attorney or his deputies or assistants, a village attorney or his deputies or assistants, a grand jury, or any agency of government which requires the records described in subdivision one, in the furtherance of their official functions.