SAN FRANCISCO (Reuters) - At least two Apple Inc retail store workers complained directly to Chief Executive Tim Cook that the company’s policy of checking retail employees’ bags as a security precaution was embarrassing and demeaning, according to a court filing made public on Wednesday.

The employee complaints, which a judge ordered unsealed, are part of a 2013 lawsuit alleging Apple should compensate employees for the time it takes to conduct the searches. One worker, whose name was blacked out of the court filing, told Cook in a 2012 message that Apple managers “are required to treat ‘valued’ employees as criminals.”

Cook forwarded it to top retail and human resources executives with the query: “Is this true?”

The court filing does not include what responses Cook received. An Apple representative could not immediately be reached for comment.

In the lawsuit, plaintiffs Amanda Friekin and Dean Pelle alleged that “screenings” or bag searches, designed to discourage theft, are conducted every time sales reps leave the store, including for meal breaks. The lawsuit, filed in U.S. District Court for the Northern District of California, seeks class action status. Lawsuits from within Apple’s ranks are rare.

A U.S. Supreme Court ruling last December, in a case involving an Amazon.com Inc warehouse contractor, handed a victory to employers, ruling that companies do not have to pay employees for the time they spend undergoing security checks at the end of their shifts. The Supreme Court found that because screening process is not a “principal activity” of the workers’ jobs under a federal labor law it is not subject to compensation.

In the 2012 email to Cook, with a subject line “Fearless Feedback from Apple Retail Specialist,” the employee said Apple’s policy implies the company does not trust its workers.

“These procedures are often performed in front of gawking customers,” the employee wrote, adding that workers deserve to be treated with the same respect that Apple shows customers.

Another email, sent by a retail worker in Beijing to Cook and other managers in 2013, said Apple treats its employees “as animals” and thieves. It also said an emergency exit in the store is blocked by Apple products.

Cook’s response to that email is not displayed in the court filing, though other Apple executives did discuss the bag search policy.

“If it is simply a deterrent there has to be a more intelligent and respectful way to approach,” wrote Denise Young Smith, Apple’s vice president of human resources.

A hearing in the lawsuit is scheduled for July 2.