His ruling comes in a legal case filed by unions on behalf of workers.