No, not only under Sharia. This is true in ANY Islamic country. As was explained to us students by an expert (and Muslim woman), especially us girls, before we landed in Egypt, a woman on the street is either PUBLIC or PRIVATE, in the eyes of Muslim men.
To be a PRIVATE woman, you need to be in a group, or accompanied by a man. You need to be appropriately modestly dressed. And even then, when they can SEE you are a foreigner, it still might not pass muster unless you have a man with you.
To be considered a PUBLIC woman is, as we were told, like being considered a prostitute. Men feel they have EVERY RIGHT to touch or molest you on the street. This is what happened to us in Egypt - we were young and American looking, even though we were dressed modestly, and men did try to grab us all the time. We fared better in the company of male students. Although one male buddy of mine was offered many camels for me and I am just glad he didn't take the offer.
How many camels?............
Patrick O'Malley (Tom Selleck): You know, I only made one mistake.
Evie Tozer (Bess Armstrong): Oh, and what was that?
O'Malley: I should have sold you when I had the chance.