I don't let other people pet my dogs unless my dogs show a friendly interest in them and the person asking is respectful.
The same as I will not like nor endure to have physical contact with everyone wanting to touch me, I will not consent to strangers forcing themselves on my dogs.