I have often photographed in a store at the parks and Downtown, no one has ever mentioned anything or even given me a dirty look.
Rides can vary with the ride and with the CM in charge at the time. For example, in "Carousel of Progress" I have been told no photographs, no flash, and nothing at all at various times. Same for the old "Alien Encounter", where I was once even stopped from taking a photograph by a CM, and later that day no problem.
I take photographs on most rides (without flash) and CMs don't say anything. Usually they will mention it up front if there are any restrictions.
One thing that is strictly forbidden is using a flash inside a dark ride. Of course no one would ever do that (I wish).
boB