Hi,

I need to hide some taxonomy select boxes, and set default term for them (right, exactly what this module does), but I need those terms to be selectable by some users (with a particular role), is there a way to achieve this?

If not, it could be a feature request to add a new permission which is "see hidden taxonomy".

Comments

bradweikel’s picture

Can you accomplish this same goal by combining Taxonomy Defaults with the Taxonomy Access Control (TAC) module? Instead of hiding the vocab globally with Taxonomy Defaults, hide it per role with TAC. I haven't actually tried this, so let me know how it goes or whether there are bugs.

If D7 wasn't making this module obsolete anyway, I'd probably remove the "hidden" feature altogether and just encourage people to use TAC, which handles more user scenarios and is probably taking a better architectural approach.

bradweikel’s picture

Status: Active » Postponed (maintainer needs more info)
pounard’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

Ok that answers my question, thanks

SeanA’s picture

Version: 6.x-1.1-beta2 » 6.x-2.1
Component: Miscellaneous » Code
Category: support » feature
Status: Closed (fixed) » Active

I like this feature, and TAC is way more module than I need. Taxonomy Defaults is small and simple.

With a minor change, the existing 'administer taxonomy defaults' permission can be used. If the user has this permission, it makes sense to let them select taxonomy terms when editing the node.

Change line 84 from this:

$visible = variable_get("taxdef_{$node->type}_{$vid}_visible", TRUE);

to this:

$visible = variable_get("taxdef_{$node->type}_{$vid}_visible", TRUE) || user_access('administer taxonomy defaults');
bradweikel’s picture

Status: Active » Closed (won't fix)

I disagree that this makes sense for the typical use case, because it would cause every user of this module to have to switch users to test their configuration. If I made this change, I can guarantee that someone would post a bug titled "hidden taxonomies are broken, won't hide" , because their hidden taxonomies started appearing on their add and edit forms.

I'm tempted to add another permission ('edit hidden taxonomy defaults'), but have the same reservations because many site admins log in as the superuser.

SeanA’s picture

No problem, I ended up using TAC anyways.

hillaryneaf’s picture

@SeanA did you use TAC + Taxonomy Defaults? I have the same issue.

SeanA’s picture

Hi nektir, I was able to use TAC by itself because, as I recall, all that I needed was hiding term selection for certain roles.

dbassendine’s picture

To answer the original question, the Taxonomy Role module works well to hide the entire term selection field (ie. per vocabulary) on the node creation form. Taxonomy terms are still applied on save, however, and this module (Taxonomy Defaults) works well to set the default term for roles which haven't been allowed access to see the vocabulary.

TAC works better if you want to exclude just certain terms for certain roles and want more fine-grained control. However, the term dropdown is still visible (even if there are no terms). I also found TAC doesn't play nicely with this module - if TAC is enabled the default term isn't set properly.

Hope that helps someone!

pounard’s picture

Whow, 3 years :) The project I was working on has been finished 3 years -20 days! Anyway, thanks!