Was The Turkish Headscarf Ruling Legal?

This past spring the Constitutional Court of Turkey ruled a law passed by the legislature which ended the ban on women being able to wear a headscarf was unconstitutional. The decision has unleashed a vigorous debate as to the right of the Court to intervene in social issues of the Turkish society. Supporters of the Court argue ending the ban avoided creating a social conflict within society while opponents argue Courts should only stick to legal issues and avoid getting involved in social problems. The debate about the headscarf has long ceased to be one about law and has become one that walks the thin line between how the rights of women are interpreted.

Supporters of the headscarf argue a woman has a right to wear one and denying religious minded women of being able to wear the headscarf, in effect, bars them from attending college. Opponents fear once the headscarf is accepted at the university level, younger girls will be subject to pressure in secondary schools to wear one. In essence, either way, one is dealing with women rights.

Is there a middle ground which makes clear the headscarf can only be worn at universities, but is not allowed in secondary schools?