Nobody has the right to take photos of people without asking their permission.
Special attention must be paid if they are going to be published online.
However, it can be difficult to take photos in a city or a museum without catching passers-by.