I want to be able to control the listing of individual terms and their children on the node creation form. For example: suppose I have two roles, "department administration" and "human resources." Suppose furthermore that I have a "Document Category" vocabulary with the following terms:
1. Accounting
- child 1
- child 2
- grandchild
2. Facilities maintenance
3. Department administration
4. Human resources
- child 1
- child 2
I want only "department administration" to be able to tag a node with terms 1, 2, and 3 and their children; and only "human resources" to tag nodes with term 4 and its children.
I found the Vocabulary Permissions module (http://drupal.org/project/vocabperms) and it almost does what I want, but it only allows control on a per-vocabulary basis rather than per-term.
I could break my vocabulary into separate "sub-vocabularies," but I anticipate that would be an extremely painful process, and in some ways just wouldn't make sense. Maybe if there were a module that allowed for the creation of super-vocabularies or vocabularies-as-terms?
A module that added a visibility control on the term edit page would be ideal.
Anyone have any suggestions?
Comments
Note that I do not want to
Note that I do not want to use the terms for any sort of access control. I don't want to change access to the nodes, just the available terms to tag the nodes with.
IIRC, the
IIRC, the http://drupal.org/project/content_taxonomy module will give you more control of the terms made available on a node edit form. Basically, you turn off the taxonomy for that page, use the content_taxonomy field for it instead, then control how the terms are displayed with options to the cck field.
===
"Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime." -- Lao Tzu
"God helps those who help themselves." -- Benjamin Franklin
"Search is your best friend." -- Worldfallz
I use content taxonomy, and
I use content taxonomy, and it does allow you to select certain terms to show on the node form. Unfortunately, this is only on a per-content type basis--the terms are hidden/shown for every node of that content type--and it does not have anything like showing/hiding terms per role per term, which is what I am trying to do.
Thanks for the suggestion though.
The module/snippet I'm looking for would probably hook onto the taxonomy module, not anything having to do with content types or nodes themselves (other than the obvious node form modification).
Tried TAC...
Apparently TAC is supposed to allow you to control whether someone can set a term when creating a node:
Well, I tried installing it... It's a monster to configure and tends to capriciously alter access to vast swaths of my site, but it might work.
Final solution?
What was your final solution to this issue? TAC doesnt really give the the basic functionality that you were talking about. Or at least I couldnt make it do that.
I did use TAC
For each role, I assigned the Vocabulary default permissions as follows:
View: I
Update: I
Delete: I
Create: unchecked
List: checked
Then, I added the specific terms that needed permissions granted for each role, along with all their subterms. So, in my example above, the "Human Resources" role would have the following permissions set for all three of 4, 4.1, and 4.2:
View: A
Update: A
Delete: A
Create: checked
List: checked
That gave me the functionality I needed.
Unfortunately, there's a serious bug in TAC where this setup results in the Human Resources role inadvertently removing tags that that role doesn't have permissions for when the node is updated. (For example, if the node was tagged with both 1 and 4, and the HR person updated the tagging to child one and then saved the node, term 1 would be lost.) To get around this, I wrote a little custom module that prevents anyone from modifying a node if they don't have TAC permissions on all the existing terms. Hopefully this issue will be fixed in TAC at some point. (I'm not sure if it's there in the 6.x version of TAC or not.)