ALBANY, N.Y. — Starbucks baristas must share their tips with shift supervisors but not with assistant managers, New York's highest court said Wednesday in a ruling that could affect how employees are paid in tens of thousands of restaurants and coffee houses across the state.

The Court of Appeals found that shift supervisors do much of the same work as the coffee servers and therefore get to share in the tips. It also ruled that the company, which is based in Seattle, can deny those tips to assistant managers.

The ruling, responding to two lawsuits, backed Starbucks' policy of divvying up the tips, saying it's consistent with labor law.

Hospitality industry groups say the court's decision likely will affect policies at similar restaurants and coffee houses and will affect 42,000 businesses statewide and a quarter-million hospitality industry workers in New York City alone.

The New York State Restaurant Association, which represents more than 56,000 restaurants, bars and clubs, called the decision a win for all New York hospitality employers seeking clarity on how to compensate employees.

"In this business, many staff members share all kinds of responsibilities, and now we have an understanding of who can participate in the tip pool," association president Rick Sampson said.

The association filed a statement in the lawsuits supporting Starbucks Corp., which had said that its assistant managers shouldn't share in the tips.

At a Starbucks on Manhattan's West Side, baristas said company policy did not allow them to comment, and customers were split on the question.

"Whoever is directly serving you should get the tip," said Marco Tan, a data analyst sitting at a table with his coffee. "Why? Because they're helping you, and someone else isn't."

Evren Vural, an architect, wasn't so sure.

"If the barista and the supervisor are doing some of the same work, they should share," he said, adding, however, that if the supervisor is not doing the work, "then it's not fair to share."

A Starbucks spokeswoman said the court affirmed the company view of the management duties performed by assistant managers.

"We're pleased the court found our customers should have the option to reward our partners for providing great service, and we're pleased the New York Court of Appeals agreed our tipping policy is fair and appropriate under New York state law," company spokeswoman Jaime Riley said.

Starbucks baristas are part-time workers who serve customers and share tips weekly based on hours worked.

Shift supervisors also are part-time wage workers who mostly serve customers but also assign baristas, provide input on their performances and direct the flow of customers.

Assistant managers are full time, get some benefits such as paid holidays and vacations and are eligible for bonuses.

Attorney Adam Klein argued assistant managers spend most of their time serving customers and should get a share of the tip jar. Klein said his clients don't have the power to hire and fire, which means they aren't "company agents" under labor law.

Judge Victoria Graffeo, in writing the majority decision, said employees who regularly provide direct service to customers "remain tip-pool eligible" even if they have some supervisory responsibility.

"But an employee granted meaningful authority or control over subordinates can no longer be considered similar to waiters and busboys ... and, consequently, is not eligible to participate in a tip pool," she wrote.

The state court didn't issue a final decision but instead issued an advisory opinion to a federal court handling the cases. The federal court had asked for the state court's view.

Starbucks has nearly 18,000 retail stores in 60 countries. In April, it reported $3.6 billion in quarterly revenue.

It had 413 company-owned stores in New York at the end of its last fiscal year. Company spokesman Zack Hutson said the tip policy is applied consistently across the U.S. but not globally because laws differ in other countries.