Is there a way I can assign access to certain files by roles? I would like there to be one page with the files listed and users can access one or more files based on their role.

Comments

Ildar Samit’s picture

Look at private files, like this module http://drupal.org/project/private_upload. I think Drupal also has something basic built into core, so double check that.

Aqua123’s picture

As far as I can tell this only privatises a single folder I see no way to add multiple folders?

bsenftner’s picture

Look into using one of the Content Access modules (I explained one of them here: http://www.missingubercartmanual.com/How-to-Create-Pages-Only-Customers-... ).

Essentially, what you want to do is:
1) create the User Roles for each protected download page.
2) create each protected download page, and give access to that page only to members of the Role you want to have exclusive access to those downloads

Outside of the scope of your question is:
A) how your users are granted the User Role necessary to give them access to your restricted access pages (to start, just grant the role by hand, but later, look into the Rules module.)
B) how you create the restricted downloads pages (to start, just make them by hand, and later on advance method that with some php or a custom module)

Hope this helps!

Aqua123’s picture

Thanks, I guess I can just display the pages with something like Panels.