Hi there ...

For general Views is doing great with respecting the settings of node privacy by role module, meaning
lets say i have a content-type called "NEWS" which is only allowed for registered users, querying for that with views won't show any results
for anons.

Well in general thats really awesome and great, but, as life always is a series of exceptions, now I need the opposite feature with one view.

Lets stick with the same example above, i want to create another display of the same view, which will be preset as a Feed.
The feed again should list every news, without respecting the settings of Node Privacy.

So my feature request would be an option to enable choosing whether you want Views to respect or disrespect the privacy module.
Of course by default should be to respect :)

Comments

dawehner’s picture

node privacy by role uses node access, and this uses hook_db_rewrite_sql.

So views would have to be able to jump over rewrite_sql, which is quite easy.

seehawk’s picture

I'm going to add a big +1 to this. Any chance this can make it into the 3.x branch soon?

In the meantime, can anyone suggest a workaround? I'm in a bit of a bind, and would appreciate any suggestions you might have.

Thanks!

dawehner’s picture

For this patch, the query handler should be able to have settings attached. There is no such patch yet, but i will write the patch, if noone else does it.

If this patch is commited, its possible to disable db_rewrite_sql

zewa’s picture

glad to hear that dereine ... thanks in advance

Greetings
Zewa

seehawk’s picture

Dereine, if you could put that patch together, you would be my hero.

Thanks!

seehawk’s picture

Just checking in on the status of this patch. If there's anything I can do by way of testing or other input, please feel free to contact me.

Thanks!

dawehner’s picture

seehawk’s picture

I just took a look at the patch in the link you referenced. It looks like there hasn't been any activity on it in a month, and that it's not in working condition. And I admittedly don't have a lot of experience with patches, but I don't see the code that would bypass the node privacy. Am I just missing something?

dawehner’s picture

Not currently, but if you can set settings to query handlers you can use it to make a settings for the default query handler to disable node access, which is exactly what you need

Scott Reynolds’s picture

In reflection of this

Not currently, but if you can set settings to query handlers you can use it to make a settings for the default query handler to disable node access, which is exactly what you need

I have to disagree if only in semantics. You wouldn't turn off node access you would turn of db_rewrite_sql.

edit: which you said in a previous comment. #read_fail

dawehner’s picture

dawehner’s picture

Status: Active » Closed (duplicate)

.