; and (bb) if the agency obtains or is subject to a court order authorizing disclosure of the record, may disclose the record. (ii) Disclosure to Armed Forces A person, including a law enforcement agency that possesses a juvenile record sealed under this section, may disclose information from a juvenile record sealed under this section to the Secretaries of the military departments (or the Secretary of Homeland Security with respect to the Coast Guard when it is not operating as a service in the Navy) for the purpose of vetting an enlistment or commission, or with regard to any member of the Armed Forces. (iii) Criminal and juvenile proceedings A prosecutor or other law enforcement officer may disclose information from a juvenile record sealed under this section, and a person who is the subject of a juvenile record sealed under this section may be required to testify or otherwise disclose information about the record, in a criminal or other proceeding if such disclosure is required by the Constitution of the United States, the constitution of a State, or a Federal or State statute or rule. (iv) Authorization for person to disclose own record A person who is the subject of a juvenile record sealed under this section may choose to disclose the record. (d) Limitation relating to subsequent incidents (1) After filing and before petition granted If, after the date on which a person files a sealing petition with respect to a juvenile offense and before the court determines whether to grant the petition, the person is convicted of a crime, adjudicated delinquent for an act of juvenile delinquency, or engaged in active criminal court proceedings or juvenile delinquency proceedings, the court shall deny the petition. (2) After petition granted If, on or after the date on which a court orders the sealing of a juvenile record of a person under subsection (b), the person is convicted of a crime or adjudicated delinquent for an act of juvenile delinquency— (A) the court shall— (i) vacate the order