Fix access rights for analyses

Closes #147

This raises a RuntimeError if a person tries to access an Analysis they are not allowed to. This is for logging purposes.

This will also need to happen for Studies, but we don't have those pages yet.
should this be check_analysis_access? My guess is that there is going to be another ones, right? Or even better, leave as check_access but add a parameter that tells you if is analysis, study, or whatever.