Check study access rights and study exists

 Fix #445
is the status id described in a lookup table?