Notwithstanding any other provision of law to the contrary, if a trustee, president, principal, or officer of any institution belonging to the University of the State of New York, or a board of education of any public school, in any city, union free, common or central school district or the administrator of any non-public school of secondary education receiving state funds permits the release of directory information relating to pupils or permits access to school buildings, school grounds or other school property to persons who inform pupils of educational, occupational or career opportunities, such trustee, president, principal, officer, board or administrator shall provide access to directory information relating to pupils and access to such school property on the same basis for official representatives of the state militia and the armed forces of the United States for the purpose of informing pupils of educational, occupational or career opportunities within the state militia or armed forces of the United States. Pursuant to this section, access provided to school property or directory information shall not be used for purposes other than informing students of educational, occupational or career opportunities.
N.Y. Educ. Law § 2-A