Apple has defeated a class action lawsuit from its California store employees seeking back pay for the time taken to undergo checks of their bags when leaving for the day.

The mandatory searches are designed to ensure that staff do not steal or smuggle out Apple products, but plaintiffs said they should be compensated for the time it took to wait for the search or undergo the search.

US District Judge William Alsup, in denying the claim, said Apple employees were free to choose whether or not to bring bags to work, and that not having a bag would mean no exit search.

“That free choice is fatal to their claims,” he said in his judgement Saturday, noting that Apple could simply have banned employees brining bags to work.

“Instead, Apple took the lesser step of giving its employees the optional benefit of bringing such items to work, which comes with the condition that they must undergo searches in a manner dictated by Apple before they exit the store.” Apple was not immediately available for comment.