If I use Taxonomy Access Control and for example for the role anonymous I hidden some vocabularies they in ubrowser are always visible in Display vocabulary;
but the terms aren't visible;
so it, at the end works, but isn't correct to list the vocabularies; infact Tac hidden in the menu both (vocabulary and its terms)

not know if is a ubrowser problem or tac problem

Comments

rszrama’s picture

Status: Active » Closed (won't fix)

I'm not really sure, but I suppose the solution is to simply not make a uBrowser for those vocabularies that non-priveleged users can see. I'm marking this won't fix as work on TAPIr has halted and this isn't a critical fix... more like a compatibility feature request.

alb’s picture

think problem is because for to make the vocabulary list uBrowser not use an internal drupal function but its own new query sql;

the search and the views (that work with Tac module) instead use a specific drupal function;

Code used by advanced search:

// Taxonomy box:
    if ($taxonomy = module_invoke('taxonomy', 'form_all', 1)) {
      $form['advanced']['category'] = array(
        '#type' => 'select',
        '#title' => t('Only in the category(s)'),
        '#prefix' => '<div class="criterion">',
        '#size' => 10,
        '#suffix' => '</div>',
        '#options' => $taxonomy,
        '#multiple' => TRUE,
      );

The above code recall the module taxonomy and its function form_all that is this:

function taxonomy_form_all($free_tags = 0) {
  $vocabularies = taxonomy_get_vocabularies();
  $options = array();
  foreach ($vocabularies as $vid => $vocabulary) {
    if ($vocabulary->tags && !$free_tags) { continue; }
    $tree = taxonomy_get_tree($vid);
    if ($tree && (count($tree) > 0)) {
      $options[$vocabulary->name] = array();
      foreach ($tree as $term) {
        $options[$vocabulary->name][$term->tid] = str_repeat('-', $term->depth) . $term->name;
      }
    }
  }
  return $options;
}

how you can notice for to make a list of vocabularies is used this: taxonomy_get_vocabularies();

and also in the views I noticed that is used always same function taxonomy_get_vocabularies();

....
 $vocabularies = taxonomy_get_vocabularies();
    foreach ($vocabularies as $voc) {
      $tables["term_node_$voc->vid"] = array(
        'name' => 'term_node',
        'provider' => 'internal',
        'join' => array(
          'left' => array(
            'table' => 'node',
            'field' => 'nid'
          ),
          'right' => array(
            'field' => 'nid'
          )
        ), 

....

So think is possiblke also in Ubrowser to use TAc module if the vocabularies list is created how
for the search and the views

alb’s picture

think problem isn't uBrowser but integration with ubercart;
infact ubrwser also use taxonomy_get_vocabularies while uc_product.module
that required uBrowser not
and in box of selection (that think is inner a ubrowser page) use own query for the vocabularies.