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: Tenants Fed Up Over No Heat & Hot Water At The Sapphire Apartments, Management Responds

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: Oxford School Superintendent Addresses Claims Related To High School Shooting

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: Detroit Man Charged After Setting Pregnant Girlfriend On Fire

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