Pompeiu's problem on symmetric spaces