SAN FRANCISCO — A California appeal court shot down a discovery order in a class action against Starbucks Corp. on Monday, ruling that the order would violate the privacy rights of job applicants with small-time marijuana convictions.

The court said the plaintiffs discovery order would paradoxically violate the very privacy they were trying to protect in bringing the suit.