The ruling is significant for its challenge to presidential authority over state-managed military forces.