By hakeem on
Hello,
I have a drupal 7 website with the following structure:
- a vocubulary: "Color"
which has terms: (red, blue, green). - nodes
which has aterm_referencefield related to "Color" vocubulary. - user profile (from durpal core):
which has aterm_referencefield realted to "Color" vocubulary.
I need to apply access control so that:
only users with term_reference = "blue" have access (full: view/edit/delete and view in other lists) to nodes with term_reference = "blue", and so on.
Is this possible without using Taxonomy Access Control module and converting term_references into roles? Is there any modules that I can use? Or should I write a custom access control module? What is the best practice?
Thanks in advance
Comments
Why not use the taxonomy
Why not use the taxonomy access module?
Thank you nevets. Well, let
Thank you nevets.
Well, let me explain more.
The main classification domain in my website is "Color", which applies for both nodes and users. If I use TAC, I should make pairs (term, role) for every color, and this is impractical because there is many colors (> 50) in the vocabulary and they increase by time, in addition to the time and care required to set up taxonomy-based permissions for each role in TAC.
Therefore, I'm thinking of using term_references to Color terms as the only single way for any association between users and nodes.
I hope this explanation is clear.
--
www.hakeem-sy.com
_
seriously-- it's the whole point of taxonomy_access which has now been adopted by acquia so will likely receive solid maintenance and support.
In any case, you can also use rules to automatically create a role for a term or if you don' already use rules, there's the single purpose role_vocabulary module as well.
Because the Color vocabulary
Because the Color vocabulary has a hierarchy, which is not supported by role_vocabulary module which acts in a one way only (roles --> terms).
--
www.hakeem-sy.com
_
roles don't have a hierarchy, so I'm not sure how the module could support it. Seems like you're left with rules or custom code then.
It might be overkill but I
It might be overkill but I see some OG in that -> Users in a group can only edit content in that group ?