Starbucks in recent days made it official: "Any customer is welcome" to spend time in its stores and use the restroom, even if they don't buy anything.

But there are limits. Starbucks doesn't want its coffee shops to become public bathrooms.

A company spokesperson stressed in an email to CNNMoney on Monday that it is asking all customers to behave in a way that "maintains a warm and welcoming environment."

If customers are disruptive, employees are advised to step in. And for Starbucks workers, enforcing those limits could be tricky.

The company offered specific guidelines in a document shared with employees. The list of inappropriate behaviors includes smoking, using drugs or alcohol, sleeping or improperly using the restroom. Starbucks added that customers who are unreasonably loud, watching something inappropriate on a personal device or whose personal hygiene disrupts others are not being considerate.

Starbucks advises employees to consider whether they'd be disturbed by the behavior in question if it was coming from a different customer. It also suggests that they consult colleagues to see if they agree the person is being disruptive. If so, employees are instructed to approach the customer and respectfully ask them to cease the offensive action while another employee watches.

If a Starbucks employee thinks the situation isn't safe, he or she should call the police.

Related: Starbucks: You don't need to buy anything to hang out in our stores

The new policy came after two black men were arrested for trespassing at a Starbucks in Philadelphia last month.

One of the men asked to use the bathroom, but an employee told him it was only for paying customers. When the pair then sat in the store without ordering anything, the manager called police. No charges were filed.

In the days following the incident, Starbucks CEO Kevin Johnson promised to make changes to ensure that nothing like this happens again.

"We don't want anyone at Starbucks to feel as if we are not giving access to you to the bathroom because you are less than," chairman Howard Schultz said after the incident. Later, at a talk at the Atlantic Council in Washington, he added, "We're going to make the right decision 100% of the time and give people the key." That's when he also mentioned that he doesn't want the coffee shops to turn into a public restroom.

Restaurant consultant Aaron Allen says the chain's choice to welcome non-paying customers is "a very bold statement."

Allen said that publicizing such a lenient policy could invite people to test its limits. "It is the type of thing that has the potential to disrupt the existing business."

Baristas at several Starbucks in Manhattan told CNNMoney on Monday that they have noticed more people hanging around their stores in recent days, but said there hadn't been any problems.

"As long as they're not being disruptive, they're allowed to stay," said one Starbucks barista.

Starbucks plans to close its 8,000 company-owned stores in the United States for racial bias training with the help of experts on May 29.

— CNNMoney's Aaron Smith, Daniel Shane and Julia Horowitz contributed to this report.