Starbucks Corp. baristas must share tips with shift supervisors, while assistant managers can be excluded from gratuity pools, New York’s highest court said in answering questions posed by a federal appellate panel.

The world’s biggest coffee chain was sued in 2008 in federal court in Manhattan by two former baristas who accused the company of violating state labor laws by including shift supervisors in tip pools. An assistant managers group sued in the same court, saying they were illegally excluded from the pool.

A federal court in Manhattan supported Starbucks in both suits, ruling that shift supervisors can share in tips because they have limited managerial responsibilities while it wasn’t obligatory to include assistant store managers in gratuity pools.