Closes #1133: Security flaw in download action

In reference to #1133.

 - edited `authorized_to_download?` method in `ResultController`.