Proposal for a module: TAC fields

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
xjm's picture

I'm considering developing a module to extend the functionality of TAC to role/field combinations. TAC works wonderfully for controlling access to whole nodes based on their taxonomy, but it's all-or-nothing; the module currently has no way of leveraging the per-field access control offered by Content Permissions.

I don't think the functionality belongs in TAC itself, as my proposed module is an additional layer of complexity that's specific to CCK content types.

Dependencies: content, content permissions, taxonomy access control

Similar/related modules:
http://drupal.org/project/workflow_fields - similar concept, but for workflow states rather than categories.
http://drupal.org/project/content_levels - main functionality (minus the degradation feature) could be implemented using Taxonomy + TAC + my proposed module.
http://drupal.org/project/premium - similar to content_levels, but does not use the access control system (so unclear if it can restrict filefields/attachments, which is one of my main use cases).
http://drupal.org/project/cck_private_fields - implements per-node per-field privacy in the hands of the node author/editor.

Is anyone else interested in this functionality (or already working on such functionality) before I dive in?

Comments

Sounds like a great idea

millionleaves's picture

I have need of the following scenario:

  • A content type that allows file uploads (PDF)
  • Four roles
  • Four taxonomy terms in a single vocabulary, where the terms correspond to the roles (Term1=Role1, etc)
  • Allow public access to the title and body but restrict access to the file download based on the role the user is in and the taxonomy term(s) applied to the node.

From how you've described it, your module would provide the final part of this scenario.

For example:
All users can see the title and body of all nodes of this content type.
Document 1 is categorised with Term1. The file download should only be available to users who are assigned Role1.
Document 2 is categorised with Term2. The file download should only be available to users who are assigned Role2.
Document 3 is categorised with Term2 and Term3. The file download should only be available to users who are assigned EITHER Role2 or Role3.

Alpha-ish module available for testing

xjm's picture

In: http://drupal.org/node/339366

Note that a patch to filefield is required to allow this or other access control modules to weigh in on file download permissions:
http://drupal.org/node/696906