The California Supreme Court in a decision delivered on Thursday found Apple broke state law by not paying retail workers for the time they spent participating in mandatory bag and device searches, leaving the company liable for millions in unpaid wages.

In a unanimous ruling (PDF link), the court holds employees were and are in Apple's control during mandatory exit searches of bags, packages, devices and other items. As such, Apple is required to compensate its employees for time spent on the anti-theft program, which in this case allegedly amounted to up to 20 minutes worth hundreds or thousands of dollars a year.

Chief Justice Tani Cantil-Sakauye notes courts should consider a number of factors when evaluating employer-controlled conduct, including location, degree of employer control, benefit to employees and disciplinary consequences. Applying the logic to the current case, "it is clear that plaintiffs are subject to Apple's control while awaiting, and during, Apple's exit searches. Apple's exit searches are required as a practical matter, occur at the workplace, involve a significant degree of control, are imposed primarily for Apple's benefit, and are enforced through threat of discipline," Cantil-Sakauye writes.

Apple's policy demands hourly retail employees submit to a search of personal packages and bags at the end of each shift and when clocking out for meal breaks. The checks are performed off-the-clock, meaning workers do not get paid for the mandatory procedure.