According to this HRW report:
Trying civilians in military courts violates international human rights norms, the groups said. Moreover, Moroccan law denies defendants in military trials a full appeals trial, as civilian court trials would have. Military trial defendants can appeal only to the Cassation Court, which reviews errors of procedure, jurisdiction, abuse of power, or application of the law. The Cassation Court has had the petition from the Gdeim Izik defendants since March 2013 but has not ruled on it.
A law that took effect in July revised Morocco’s military justice law to remove civilian defendants from the jurisdiction of military courts. The new law does not mention the judicial status of civilians imprisoned by military courts before it entered into effect.