Restrict CiviCase Status changes
The form validation hook:
http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_validateForm

When you say "until it has passed through...", in the hook you could look up the prior activity revisions.