Hello,
I am fairly comfortable with my current drupal installation, but am wondering what is the best way to approach this the Drupal way.
I have a company site where I would like to post documents, pdf reports, word docs, etc for my partners. I would only like the individual partners to see the documents uploaded for them, and none of the other partners docs. Also, possibly have the ability to have individual roles for each company, like admin, sales, marketing, etc.
This is how the process would work.
1. A drupal user is created (Joe) with a specific company and a role within that company. (I assume this would be custom profile fields, company and role)
2. The site admin (Amy) or anyone else with proper priviledges uploads a document and selects which company(s) and role(s) can see this doc.
3. Joe logs in and clicks on "my reports" and sees only what has been uploaded for his role/company.
I hope I made this clear, and any help is appreciated.
Thanks, John - Drupal 4.6
Comments
Taxonomy access control
I have a comparable situation on one of my sites, and I use the Taxonomy Access Control module (http://drupal.org/project/taxonomy_access). This module allows you to set access permissions to any term in your taxonomy for all available roles. So in your case, you would create a vocabulary (e.g. called "companies"), and add a term for each company. In the vocab setup page, you enable "multiple select". You set create/edit/view/list/delete permissions for every term/role combination using Taxonomy Access Control module. Next, when Amy creates a new node, she selects the appropriate terms for that node, et voila.
For this to work also for uploaded files attached to these nodes, make sure to set the download method to private (admin->settings).
The Taxonomy Access Control module can be quite complex, and sometimes the final result of all permissions can be quite unexpected, so make sure to create a few test users for every role, and give it a try. But once everything is fine-tuned, it works great.
Works!
Thanks DriesK! I just got around to testing your solution today. It works perfectly for what I need based on what I have seen so far in my limited test. Try doing this in Mambo/Joomla :)
This has made me a true Drupal fan over others.............
Do I have to create a separate role for each company?
1. I have added a vocab called "companies" under which I put CompanyA, B, C etc.
2. Then I created a role called "CompanyArole", "CompanyBrole", etc.
3. Then I edited the category permissions for "CompanyArole" to only allow viewing/listing of all nodes with the Category "CompanyA" and also uncatergorized nodes. I repeated this for every company.
This works fine and serves the purpose. My question is can this be done with some sort of "mask" or something, so I would only need to create a Category for each company and not all the rest? The only reason why I ask is someone with very little technical skills will be maintaining the company list, and I can see this might be a little complicated for them.
Probably too much to hope for, but worth a try.