If you build a view and the private_taxonomy_query_term_access_alter query is executed for some reason, the module can sometimes disable content for non-privileged users even if the view does not use a private taxonomy vocab.

The code is this

      // Views exposed filter uses 'machine_name' instead of 'vid'.
      if ($field == 'machine_name') {
        $info = taxonomy_vocabulary_get_names();
        if (is_array($condition['value'])) {
          $flag = FALSE;
          foreach ($condition['value'] as $machine_name) {
            $vid = $info[$machine_name]->vid;
            if (!private_taxonomy_is_vocabulary_private($vid)) {
              $flag = TRUE;
              break;
            }
          }
          if (!$flag) {
            return;
          }
        }

As you can see: even if private_taxonomy_is_vocabulary_private returns FALSE, the flow is not stopped and the content may get hidden.

Comments

trobey’s picture

Status: Active » Needs review

It indeed looks like I cut and pasted code and missed something. I have updated the code and committed it to 7.x-1.x-dev. I do not have a good test case so anyone that can test this would help.

killes@www.drop.org’s picture

Thanks, that works!

Andre-B’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.