Closed (fixed)
Project:
Views (for Drupal 7)
Version:
6.x-2.8
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
2 Mar 2010 at 21:15 UTC
Updated:
3 Jun 2011 at 03:06 UTC
Is it possible to have a view that filters out content that the current user doesn't have permission to view?
In my case I want to use the taxonomy term page supplied by views but to not display content in the results that the user does not have permission to see.
Comments
Comment #1
dawehnerThis should be done automatically. There is the node access system which alters the query dynamically. It should take care of the view permissions. Do you have enabled some caching?
What for a kind of node access system do you use?
Comment #2
azoho commentedThanks for reply.
I'm using Node Access
in addition to Content Permissions and Taxonomy Access Control
Eg. I have Blog content types visible only to registered users, but when viewing a taxonomy page, the views override page, Anon users can see the Blog entries in the list (but get access denied when clicking to see full node).
Comment #3
dawehnerThis should be a bug of drupal core. Views does not implement the node access... Thats my oppinion.
Comment #4
azoho commentedFrom my searches on Drupal.org about this I would be inclined to agree with you.
I was wondering if there was a views filter or argument I could use that would act as a workaround, but I guess it will still refer to drupal core in any case
Thanks for your reply
Comment #5
dawehnerThere is one in the latest dev version.
Comment #6
merlinofchaos commentedOne quick note: The 'unpublished' check must be added to the view *if* that is the reason the content is not viewable. Otherwise, it is possible that you may need to rebuild your node access tables, but in general Views respects any node_access because it uses db_rewrite_sql so it should 'just work'.
Comment #8
louise365 commentedIt seems View does not support filter result by user role or anything like permission.I think next patch of Drupal or View should solve this issue.Sometimes,it's really an important feature.
Comment #9
louise365 commentedComment #10
rschwab commentedHi Louise!
I think you are mistaken. See comments #3, 5 and 6. If I am wrong please provide steps to reproduce the problem.