Skip to main content
deleted 9 characters in body
Source Link

I am usinguse the Token Content Access module to hide member created nodes from public view and but allow them to share private links with private links (URL tokens). My problem is when a user restricts access to individual nodes using URL tokens, he cannot access them without the token either!

I am using the Token Content Access module to hide member created nodes from public view and but allow them to share private links with private links (URL tokens). My problem is when a user restricts access to individual nodes using URL tokens, he cannot access them without the token either!

I use the Token Content Access module to hide member created nodes from public view and allow them to share private links with private links (URL tokens). My problem is when a user restricts access to individual nodes using URL tokens, he cannot access them without the token either!

deleted 643 characters in body; edited title
Source Link

Accessing content from views Token Content Access blocks access for author too

I am using the Token Content Access module to hide member created nodes from public view and but allow them to share private links with private links (URL tokens). My problem is I would like towhen a user restricts access thoseto individual nodes through viewsusing URL tokens, someone did a brilliant patch on tca_views_query_alter() buthe cannot access them without the node is viewable only for admin users, not for all authenticated users. Any suggestions on how to make it work?token either!

    function tca_views_query_alter(&$view, &$query) {
  // Alter all node queries to remove TCA protected nodes if user does not have
  // bypass access.
  if($view->name != "view_name_here" && $view->name != 'another_view_name_here_if_needed'){
      if ($query->base_table == 'node' && !user_access('bypass tca_node')) {
        $query->add_field('node', 'tca_active', 'tca_active');
        $query->add_where_expression(0, "node.tca_active = '0' OR node.tca_active IS NULL");
      }
  }
}

Accessing content from views

I am using the Token Content Access module to hide member created nodes from public view and but allow them to share private links with private links (URL tokens). My problem is I would like to access those nodes through views, someone did a brilliant patch on tca_views_query_alter() but the node is viewable only for admin users, not for all authenticated users. Any suggestions on how to make it work?

    function tca_views_query_alter(&$view, &$query) {
  // Alter all node queries to remove TCA protected nodes if user does not have
  // bypass access.
  if($view->name != "view_name_here" && $view->name != 'another_view_name_here_if_needed'){
      if ($query->base_table == 'node' && !user_access('bypass tca_node')) {
        $query->add_field('node', 'tca_active', 'tca_active');
        $query->add_where_expression(0, "node.tca_active = '0' OR node.tca_active IS NULL");
      }
  }
}

Token Content Access blocks access for author too

I am using the Token Content Access module to hide member created nodes from public view and but allow them to share private links with private links (URL tokens). My problem is when a user restricts access to individual nodes using URL tokens, he cannot access them without the token either!

Source Link

Accessing content from views

I am using the Token Content Access module to hide member created nodes from public view and but allow them to share private links with private links (URL tokens). My problem is I would like to access those nodes through views, someone did a brilliant patch on tca_views_query_alter() but the node is viewable only for admin users, not for all authenticated users. Any suggestions on how to make it work?

    function tca_views_query_alter(&$view, &$query) {
  // Alter all node queries to remove TCA protected nodes if user does not have
  // bypass access.
  if($view->name != "view_name_here" && $view->name != 'another_view_name_here_if_needed'){
      if ($query->base_table == 'node' && !user_access('bypass tca_node')) {
        $query->add_field('node', 'tca_active', 'tca_active');
        $query->add_where_expression(0, "node.tca_active = '0' OR node.tca_active IS NULL");
      }
  }
}