Can my landlord come in without permission in advance?

My bf called and said that he finished working on his truck and went inside to change his clothes. He have just taken off his shirt when our landlord walk right on it with a potential renter. He apologized and asked if he should come back later. My bf a moment ago said now and left the house. I am mad because I be doing laundry last night and my undergarments are probably in full landscape. Its very embarrasing. My landlord and I have a cool relationship, but come on not that cool. He's be pretty good about calling me and asking if he can show the house or if I could just show it. He did appointment once and I didn't answer cause I was at the movies and he went inside anyways. Is anything he doing right or lawful?
I'll try to explain this the best I can.

When you have a landlord, and you are renting, it is technically their property. It is legal for him to come on the property and show someone who might rent it the inside.

But somewhere on the lease, I come up with, there is something saying that they just can't barge surrounded by whenever they want. It's an invasion of privacy.

My parents can enter the rental houses, but they say it is best to ask them first, just in valise, because it'll just prevent arguments and it's politer.

There might be something on his lease that is different, I don't know.

But if he needs to show the house, later I believe the landlord is able to, because if you might not be living there any longer, consequently he needs to make sure someone who might rent knows what the interior looks approaching.

It's rude, but legal.
I'm pretty sure he has to give you mind before just barging into your apartment... even if he's showing it! All legal.