Forum: Ruby on Rails Password Protecting Documents with Rails Authentication

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
D190b556d99e97168d2ff1adf3b43575?d=identicon&s=25 Bryan Cox (deuceofhearts)
on 2007-01-15 09:27
Hello all,

I'm working on a project which involves users uploading and downloading
documents.  I am using the file_column plugin to do this.

The file_column device stores the documents in the public folder, in the
folder documents.  What I would like to do is require that a user be
authorized before they download a document from that directory.  What
suggestions do you have on the best way to go about this?

My thought is to create a controller that intercepts all requests for
that directory, and then if the user is logged in it will allow the
download by passing the data manually.  I really wish there were a more
elegant method, however.

Thanks
54077fb03c95861af85880218cf7aef2?d=identicon&s=25 Gokhan Arli (sylow)
on 2007-01-15 12:51
Helo Bryan,

If you are using lighttpd then check out

http://trac.lighttpd.net/trac/wiki/Docs%3AModSecDownload


I used it for image download website successfully. It is
straightforward.

Good luck
Gokhan Arli
www.sylow.net

Bryan Cox wrote:
> Hello all,
>
> I'm working on a project which involves users uploading and downloading
> documents.  I am using the file_column plugin to do this.
>
> The file_column device stores the documents in the public folder, in the
> folder documents.  What I would like to do is require that a user be
> authorized before they download a document from that directory.  What
> suggestions do you have on the best way to go about this?
>
> My thought is to create a controller that intercepts all requests for
> that directory, and then if the user is logged in it will allow the
> download by passing the data manually.  I really wish there were a more
> elegant method, however.
>
> Thanks
6d57db44c5a4e0721cc7f78cf0ce308a?d=identicon&s=25 Stephen Bartholomew (steveb)
on 2007-01-19 16:30
(Received via mailing list)
Hey,

There is a bit of discussion about this on this post:
http://groups.google.co.uk/group/rubyonrails-talk/...

Steve
This topic is locked and can not be replied to.