LANSING (AP) – A judge has rejected a challenge from opponents of Michigan’s right-to-work law who claimed people were illegally locked out of the Capitol when lawmakers debated the legislation in 2012.

Court of Claims Judge Deborah Servitto ruled in favor of the Legislature and dismissed the lawsuit Friday. She says the rights of the public were not impaired when the Capitol was temporarily closed by state police due to overcrowding.

READ MORE: 'My Name Is Sara' Film On Holocaust Survivor Premieres In Metro Detroit

Servitto says members of the public and news reporters were in the House and Senate. Neither chamber approved the bills while the Capitol was closed.

READ MORE: Dearborn Homecoming Festival Kicks Off This Weekend

Workers can’t be required to pay union dues or fees under the right-to-work law. Opponents wanted the law struck down, saying closing the Capitol violated Michigan’s open meetings law.

MORE NEWS: Huron Valley Students Will Not Be Allowed To Carry Backpacks To High School Classrooms, Officials Say

© Copyright 2015 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.