Judge rules against Chief of Defence Staff in promotion laws