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.
Same here?