Hi!

I have setup user permissions for different content types, but a user performing a site search can still see content types they don't have permission for in their search results. They still cannot view the node itself but they see the title and some of the body text in the search results.

How do I configure this so that users only ever see content they have permission for in their search results?

Comments

Adam S’s picture

subscribe

Anonymous’s picture

Hi there

I found the same to my dismay! Could result in a real disaster if you have sensitive stuff on your site.

I found this module - http://drupal.org/project/search_restrict - which I have not tested yet but which looks like it would fit the bill.

azoho’s picture

Thanks very much FromOZ that works great for me.

Still, there is a problem with the default taxonomy term list pages where all users can see teasers of content that they should not be able to. Their access is only blocked when they click read more.

Is there a way to restrict the display of content in term pages based on the user's permission? I'm looking into the default views taxonomony view to solve this but not having much luck.

chrispeat’s picture

I have posted a similar query... http://drupal.org/node/725300 and the result seems to be creating authentication on the template page.

I am trying to work through that this morning and will post up findings, any help would be awesome!

Ashford’s picture

My solution for this problem was to use the Custom Search module to limit the content_types to just the ones available to Users with permission to Search.

For the other content_types, limited to specific Users, I created a View; displayed it as a page that only my trusted Role could see.

    Modules used for Drupal 6
  • Core: Search
  • Contributed: Custom Search
    Customize the default search, change labels, default texts, ordering, and display content types and taxonomy selectors.
  • Contributed: Views
    Generate lists as pages or blocks and limit who can view the list.