On the campaign trail, Donald Trump’s vows to “drain the swamp” and attacks on Hillary Clinton’s use of personal e-mail gave hope to those who believed he would embrace openness and outside scrutiny.

After becoming president, however, Trump has slammed shut access to White House visitor logs, scrubbed data from federal websites, zealously pursued government leakers and even toyed with ending regular news briefings.

Much of what he’s done is frustrating those who were counting on Trump to shed new light on the often unseen forces controlling Washington. “I was sorely disappointed,” said former Utah Republican Rep. Jason Chaffetz, past chairman of the powerful House Oversight Committee. “It’s essentially the same.”

Trump’s actions are bringing new energy and focus to transparency advocates, who are filing numerous lawsuits to preserve the status quo. One group, Citizens for Responsibility and Ethics in Washington, says in a June lawsuit that Trump is violating the Presidential Records Act by deleting tweets and using private messaging apps. “This is an administration that seems to be taking every step it can to restrict information ... other than what the president specifically wants to make public, and is incredibly frustrated when they can’t control that,” said Noah Bookbinder, executive director of CREW.

The Trump administration strongly defends its record.

“President Trump and his Administration are committed to transparency and accountability throughout the government,” deputy White House press secretary Lindsay Walters said in a statement. “The administration is responsive to public records requests, instituted new lobbying standards for political appointees — including a five-year ban on lobbying and a lifetime ban on lobbying for foreign countries — and expanded and elevated ethics within the White House Counsel’s Office.”

Even some Trump supporters are disappointed with his record on open government. After learning in September that members of the administration were using private e-mail accounts to conduct government business, Chaffetz’s successor on the House Oversight Committee, Rep. Trey Gowdy, R-S.C., sent a letter to the White House demanding to know the extent of the practice. The president’s counsel wrote a brief reply saying the administration complies with the law.

Late last year, Tom Fitton, president of Judicial Watch and a virulent critic of former President Barack Obama and Hillary Clinton, called for a “transparency revolution” in the Trump administration. He hasn’t seen it yet. In fact, Fitton said, “it’s gotten worse.”

Unusually secretive, open

Trump vaulted into office during a time of renewed political conflict over the scope of presidential secrecy, one that presidents have wrestled with dating back to George Washington.

Trump refused to release his tax returns, a ritual for previous presidential contenders going back decades. But almost daily on Twitter, the president displays a level of unvarnished openness beyond comparison with past administrations. His 1,800 tweets so far as president provide insight into his anger and disagreements with his Cabinet, something past presidents have sought to hide, said Mary Graham, a researcher at Harvard University and author of “Presidents’ Secrets,” a 2017 book about White House secrecy.

In at least 22 tweets the president rails against the alleged leaks fueling a steady stream of stories about Russian meddling in the 2016 election, internal administration squabbles and even a classified transcript of the president’s conversations with foreign leaders.

The Trump administration is “both unusually open and unusually secretive,” Graham said.

Candidates who embrace openness on the campaign trail often struggle to meet that commitment in office.

In 2008, Obama pledged the most transparent administration in history. During his tenure, millions of federal records were posted online and for the first time, after a lawsuit, the White House website provided logs of who was visiting the president and his staff.

Yet Obama’s promise exposed him to accusations of hypocrisy whenever he moved to restrict information. Frustrated by leaks of information from the CIA, NSA and State Department, Obama’s Justice Department prosecuted more people under the Espionage Act, a 1917 law that punishes anyone who discloses sensitive information, than all previous administrations combined.

In the run-up to Trump’s inauguration, university researchers and transparency advocates frantically downloaded huge amounts of public government data, especially on climate change, that they expected to disappear from federal websites under a new administration that rejects the concept.

While the vast majority of federal data remains online, the new administration’s efforts to hide its actions from public view far outnumber those that shed new light. Among those, the administration has ended the regular publication of enforcement actions against kennels, horse breeders and other animal facilities and reports detailing workplace fatalities.

The first bill signed into law by Trump eliminated a requirement that oil companies disclose their payments to foreign governments. Republicans in Congress derided the anti-bribery measure, enacted by the Obama administration, as a wasteful burden on business.

The administration declined to release the names of people serving on some of its deregulation advisory groups, saying it was protecting their privacy. Trump’s voter fraud commission repeatedly failed to hand over its records to the public, bringing sharp criticism from a federal judge in August.

Some of those moves are sparking a bipartisan backlash. In May, the Justice Department issued a legal opinion that federal agencies no longer needed to honor information requests from members of Congress who aren’t committee chairs. Given that Congress is controlled by Republicans, that meant Democrats were effectively barred from oversight, a crucial way that the public learns about the activities of its government.

Sen. Chuck Grassley, R-Iowa, wrote a seven-page letter of protest, and said he would hold up the appointment of the Justice Department’s Office of Legal Counsel director. In July, the nominee, Steven Engel, conceded the opinion was faulty, and that every member of Congress is authorized to get information from agencies.

Chaffetz, the former congressman, said he presented the White House and Attorney General Jeff Sessions with a binder full of unfilled information requests related to Obama administration activities. His overture got “little to no response,” Chaffetz said.

In an interview this summer, U.S. Sen. Al Franken, D-Minn., said he’s not surprised that Trump hasn’t championed openness. “If he has strong feelings, it’s more toward controlling things, and not releasing, not being open,” Franken said.

Some remain encouraged, however. The president’s nominees to the agency that protects federal whistleblowers are strong advocates for people who report waste, fraud and other wrongdoing in government, said Tom Devine, legal director for the Government Accountability Project. His nonpartisan group advocates for public employee and corporate whistleblowers.

“He ran as a citizen whistleblower of abuses of power, against bureaucracy,” Devine said. “He can’t do that without a partnership with whistleblowers.”

In June, Trump signed into law a bipartisan bill that created an Office of Accountability and Whistleblower Protection within the Department of Veterans Affairs, an agency beset by scandals. The president said it would shield “honest” VA employees who report wrongdoing.

On Saturday, Trump tweeted that he could soon open the remaining closed files related to the assassination of President Kennedy, though he left open the possibility that others could convince him to keep the documents sealed.

Pursuit of leakers

A louder message to emerge from the Trump administration is this: Leakers who cross the president will be punished. In June, the FBI arrested a 25-year-old federal contractor from Georgia named Reality Leigh Winner on allegations she gave a classified NSA report on Russian hacking of U.S. election systems to the Intercept, an online news site. Winner is the first person charged under the Espionage Act by the Trump Justice Department.

A succession of unauthorized disclosures culminated on Aug. 3 in the Washington Post’s publication of leaked transcripts of the president’s phone calls in January with the leaders of Mexico and Australia.

The next day, Julian Assange of WikiLeaks tweeted: “Between Trump’s directness & leaks the Trump admin. is the most transparent in living memory — despite its policies. Good or bad?”

Sessions announced a crackdown on leakers the next day, saying they threatened national security.

Fitton, of Judicial Watch, sees it as an appropriate step, and makes a distinction between whistleblowing — a legitimate effort to speak out to report misconduct — and leaking of classified information, which is misconduct.

Others see the administration as a victim of its own inclinations. “There would probably be a lot fewer leaks if there were more transparency,” said Lisa Rosenberg of Open the Government, a Washington advocacy group.

In September, National Security Adviser H.R. McMaster informed agency leaders that all federal employees would go through an hourlong training about protecting sensitive information.

He made that announcement in a memo, which someone leaked to BuzzFeed News.