Apple's just scored a court victory over some of its store employees who were demanding payment for the time it takes to conduct bag security checks that take place every time they clock out.

The checks, which some workers complain can take up to 15 minutes including waiting time, are carried out to ensure none of a store's iDevices have accidentally slipped into workers' bags during the course of the day. Or been stolen.

U.S. District Judge William Alsup on Saturday threw out a class-action lawsuit representing just over 12,000 of the tech company's California-based retail employees in connection with Apple's bag-check policy, Reuters reported.

Related: Apple Stores now have pressure-sensitive tables to promote 3D Touch

The ruling by the San Francisco court saves Apple from having to cough up six years' worth of compensation payments for staff working at the 52 Apple Stores in the state, which one person involved in the case said could've cost the tech giant up to $60 million.

The lawsuit was brought in 2013 and granted class-action status in July of this year. In some hard-hitting remarks that made the headlines back in June, one worker said in the claim that the bag checks meant store managers "are required to treat 'valued' employees as criminals." Another called the checks "demeaning," complaining that they're often carried out by security staff in full view of customers.

Related: Apple facing massive damages after University of Wisconsin wins chip patent case

In his ruling, Judge Alsup pointed out that employees could avoid the searches simply by attending work without bags.

"Rather than prohibiting employees from bringing bags and personal Apple devices into the store altogether, Apple took a milder approach to theft prevention and offered its employees the option to bring bags and personal Apple devices into a store subject to the condition that such items must be searched when they leave the store," the judge said.

The plaintiffs' representative said they were disappointed by the judge's ruling and are now considering whether to appeal. Apple declined to comment.