Is it possible to create a list of pages in a view even if a user doesn't have access to those pages?

drupal.stackexchange https://drupal.stackexchange.com/questions/238368

  •  31-12-2020
  •  | 
  •  

Question

I'm creating a set up in Drupal 7 using Organic Groups and the Subgroups module where there is a Company group, and each company can have multiple Project groups. I'd like to allow users that have access to a Company Group to see all Projects underneath that company in a View, regardless if they're part of the project group or not. From there, a user can either view the project page, or they can subscribe to the project group.

Is it possible to give a user access to a parent group and allow to see all of its child groups in a View, but restrict viewing a page in a child group?

Was it helpful?

Solution

Have you tired disabling SQL Rewriting?

In the advanced fieldset in the right column when editing the view, click Query Settings

There is a checkbox "Disable SQL Rewriting" which has help text "Disabling SQL rewriting will disable node_access checks as well as other modules that implement hook_query_alter()."

Try checking that checkbox and saving the View

Licensed under: CC-BY-SA with attribution
Not affiliated with drupal.stackexchange
scroll top