If you let people walk all over you, you are teaching them a lesson. That they can walk all over you and get away with it. So they will learn from this lesson, and do it again.
What’s the alternative? When somebody does something which makes you unhappy, tell them this is not welcome and not acceptable. They will learn a valuable lesson that you will not tolerate anything less than what you deserve. And you will be treated with respect.
Remember, you teach others how to treat you…