A federal judge has ruled that two appointees of former President Donald Trump, including former White House press secretary Sean Spicer, do not have to be reinstated to the U.S. Naval Academy board while they sue President Joe Biden for removing them.

The motion was denied on Saturday by U.S. District Judge Dabney Friedrich in Washington. Bloomberg reported.

Spicer and former Office of Management and Budget Director Russell Vought were seeking a preliminary injunction to force Biden to put them back on the board while their lawsuit continues. They sued in September when they were removed from their appointments.

The judge, who is a Trump appointee, rejected the pairs’ claim that their removal would “silence dissenting views” on the board, which gives advice to the president on the Naval Academy’s “state of morale and discipline,” it’s curriculum, physical equipment and fiscal affairs, Bloomberg reported.

Spicer and Vought “give no indication that their views on the governance of the Naval Academy actually differ from the other board members,” Friedrich wrote. “Nor do they explain how it would serve the public interest to present advice to the president — the primary function of the board — that the president does not intend to consider.”

“We are disappointed by the decision to deny immediate injunctive relief to our clients,” said Gene Hamilton, general counsel of America First Legal Foundation, which is representing Spicer and Vought.

Spicer and Vought said in their complaint that Biden doesn’t have the legal authority to remove them because Congress sets three-year terms for board members.

But the judge rejected the claim, saying, “Such term-of-office provisions do not constrain the president’s removal power. To the contrary, they serve only to limit the length of an officeholder’s term.”

Current White House press secretary Jen Psaki said at the time of their removal from the board that the purpose was to make sure board members were qualified and aligned with the administration’s values. Trump adviser Kellyanne Conway was asked to resign from the Air Force Academy’s board of visitors at the same time.

Spicer is currently host of “Spicer & Co.” on Roaring Patriot.