Once you give a cat the taste of the outdoors, it's going to think, and rightly so, that it can go out whenever it wants. If your friend wants to keep the cat in permanently, then as Karen said, she has to be consistent. The cat will carry on for a while but it'll soon learn that it's in to stay and will eventually get used to the idea. Tossing a toy for her to play with before your friend leaves is a good way to get her away from the door or making sure that she's in another part of the house, not isolated but not having access to the door. Don't be surprised if the cat becomes a door darter.