Topic: restrict access to some, but not all subdirectories

Hi People of Ruby and Rails,

I am a complete nub when it comes to ruby and I have only just started it so please have some patience with me.
I was wondering if it would be possible to limit access to a certain subdirectory for a specific user as in the following scenario:
- user logs in
- user has been given access to subfolder_1 and subfolder_2, but not to subfolder_3 and subfolder_4
- user can access the files (jpg, png, gif, pdf) in subfolder_1 and 2 but not in 3 and 4.
- user 2 can log and acces subfolder_1 and subfolder_3, but not 2 and 4.
etc...

Is this possible? Could anyone point me in the right direction, possibly by posting the right google search words?

Regards,

bov

Re: restrict access to some, but not all subdirectories

Check out the CanCan gem - http://railscasts.com/episodes/192-auth … ith-cancan

What you want and what you need are too often not the same thing!
When your head is hurting from trying to solve a problem, stop standing on it. When you are the right way up you will see the problem differently and you just might find the solution.
(Quote by me 15th July 2009)

Re: restrict access to some, but not all subdirectories

thank you i will checkk it out!