Is this allowed?

I have a coworker who isn't apart of my team but she works in the same department as me. She works in our department but does a different job and wears different uniform. She's sort of like a vendor. She likes to talk to the coworkers who is apart of my team and she always talks about work related stuff. So one day my manager comes up to her and tells her not to talk to any of his associates. I have multiple coworkers come from other departments who come to my department to chat with me and he has never told me anything or the coworkers who come and talk to me. Before he was a manager he used to sit and chat with other coworkers just like this.
Is this allowed?
Post Opinion