Before he became mayor, Bill de Blasio pushed for more transparency in government, but now that he's the chief executive, he's changing his tune and using his power to block emails from outside advisers that many say should be public. NY1's Grace Rauh filed the following report.

In 2010, Bill de Blasio was knocking his future rival in the mayor's race, City Council Speaker Christine Quinn.

"You can't wait for transparency," de Blasio said at the time.

De Blasio, who was public advocate at the time, wanted Quinn to move faster on a reform to make government more transparent. The speaker was promising to put more information about budget earmarks for Council members online. De Blasio wanted it up and running more quickly.

"I am sure every member can identify that universe accurately and provide it to us in a way that allows us to show the public what's happening," de Blasio said at the time.

It was a position very much in line with his priorities at the time. As public advocate, de Blasio positioned himself as a champion of transparency. In 2013, the year he ran for mayor, he issued a tough report on the the city's handling of open-records requests. He doled out letter grades to city agencies based on their performance. The Police Department got an F. So did the city's public housing authority.

But now that he is mayor, de Blasio sees the world a bit differently. He denied NY1's request to release emails between himself and top administration officials and an outside adviser, Jonathan Rosen. The mayor's legal team is arguing that Rosen's emails should be kept from the public, even though he is not paid by the city and has no contract to provide advice to the mayor. He is one of five outside advisors the city insists are protected from open-records requests.

"Freedom of Information Law actually provides exemption from communications between the city in itself and its agents. And in certain circumstances, there are folks who are not city employees but are acting as agents of the city," said Maya Wiley, counsel to the mayor.

Normally, emails between people in government and those outside government are routinely shared with the public through open-records requests.