The Senate on Wednesday night unanimously approved having its lawyers represent current and former members and staff who are subpoenaed for Sen. Bob Menendez's upcoming trial on bribery and other charges.

The resolution also authorizes testimony and the release of documents that under Senate rules could have been barred from being made public.

Menendez's lawyers are seeking to have his April 2015 indictment thrown out, but if they fail, jury selection in the case against him and Florida eye specialist Salomon Melgen is due to begin later this month.

Prosecutors: Menendez motion to dismiss charges 'meritless'

Experts:Menendez filing won't prevent trial, but could keep case from going to jury

Related:Eye doctor accused of bribing Menendez convicted in Florida Medicare fraud

Menendez is accused of accepting bribes from Melgen in the form of luxury travel and contributions to political committees that helped him win re-election in 2012. In exchange, Menendez is accused of using his influence to boost Melgen's business interests.

One allegation says Menendez used his office to pressure Medicare officials about a regulation Melgen was accused of abusing to obtain $9 million in improper payments.

The indictment cites Menendez's efforts to get Harry Reid, the former Senate majority leader from Nevada, and Tom Harkin, a former senator from Iowa who chaired the health committee, involved in applying that pressure.

Neither Reid nor Harkin is accused of any wrongdoing. Menendez has said he will be found innocent of all charges, and in a recent court filing, his attorneys argued he was raising questions about the regulation because of the potential that public dollars would be wasted.

Reid and Harkin could be witnesses at the upcoming corruption trial, and the resolution sponsored by Majority Leader Mitch McConnell that passed on Wednesday authorizes unnamed former senators and staff to testify and produce documents.

"It would also authorize Senate Legal Counsel to represent individuals called to testify at trial as fact witnesses regarding their performance of official Senate responsibilities," McConnell said in a statement in the Congressional Record.

The taxpayer-funded attorneys would not represent Menendez, who has had a legal defense fund since January 2014.

Melgen was convicted In April on separate charges in Florida of 67 counts of Medicare fraud. He is due to be sentenced for those crimes on Aug. 11.