Glee star Mark Salling pleaded not guilty to two charges of receiving and possessing child pornography in court on Friday, reports the Associated Press. Salling also had his internet access and travel privileges heavily restricted in the time leading up to his trial in July. 

Last week Salling, who starred as Noah "Puck" Puckerman on the Fox musical series, was charged last week with two counts of receiving and possessing child pornography after being indicted by a grand jury. As we previously reported, Salling was arrested in December after police and federal officers seized a laptop that allegedly contained child pornography.

Although prosecutors initially wanted Salling to be held without bail, they agreed to one after discussing the matter with Salling's attorneys and reaching an agreement, Page Six reports. The judge set Salling's bail at $150,000, $100,000 of which comes from his own money to guarantee court appearances in the future. After Salling pleaded not guilty, a trial for July was set. 

In the time leading up to the July trial, Salling must get permission from the federal authorities to use any internet-connected devices. He also has to submit to drug tests and wear a location monitoring bracelet.

When Salling was arrested last December, he was charged with using the Internet to procure a pornographic image and a video of two young girls and for possessing two other porn videos with young girls. If found guilty on both counts, Salling could face up to 40 years in prison. 

This isn't the first time the Glee actor has been at the center of controversy. Back in 2013 Salling was accused of sexual battery after allegedly forcing sexual intercourse on a woman "without a condom," but that case was later settled. 

Neither Salling nor his attorney Alan Eisner offered a comment to reporters upon leaving the courthouse.