Check study access rights and study exists

 Fix #445
Nope. The test study is inserted as public, which locks any status changes using the setter.