Two-time Olympic champion Caster Semenya has won a partial victory at the European Court of Human Rights.