A New York judge ruled Wednesday that Attorney General Eliot Spitzer has the authority to challenge the allegedly unreasonable compensation of former New York Stock Exchange Chairman Richard A. Grasso on behalf of an investing public that would otherwise lack standing to sue over the claimed lack of oversight at the exchange.

Spitzer has charged that Grasso and his ally on the NYSE’s compensation committee, Kenneth G. Langone, put together an almost $200 million pay package for Grasso in violation of the state’s non-profit law, which requires that executive compensation be reasonable.