It is not a secret or military court, but a civil one. And yes, we're fighting against it.
Also, the European Court of Justice is currently in the process of deciding whether the data retention directive violates basic rights. From what has been heared from the court lately, things look as if the directive will be shot down at least in part.
Also the whole point of having Courts grant permission for stuff is to be a check on the executive and legislative's power. Whether that worked well in Turkey or not is a whole different issue. But I'm guessing they wouldn't bother to pass this law if it didn't.
So Turkey's finally getting serious about its EU candidacy.
https://en.wikipedia.org/wiki/Data_Retention_Directive