views:

93

answers:

2

Hi,

Basically, I'm looking for an easy way (module) to add a private/public option to any kind of content I may published in Drupal (blog entry, image, etc.). So that when I'm logged in, I can see everything. But when an anonymous user visit the site, he will only see the public stuff. It's way to manage a kind of front window/back-store architecture. I can use the same Drupal installation to all my needs and choose to filter the stuff I may want to make publicly available.

* Important : 1) Private items must not be accessible even if anonymous users guess its URL; 2) Private item must not show up if anonymous user perform a search; 3) Private content must not be indexed by search engines; 4) Private items should show up if I perform a search while being logged in.

Any idea?

Thanks a lot,

P.

+1  A: 

Try Node Access: http://drupal.org/project/nodeaccess - it seems to be exactly what you are looking for.

mingos
+1  A: 

Take a look at Taxonomy Access Control--it allows you to assign access rights to user roles based on a taxonomy vocabulary. In addition it allows several levels of access (View, Update, Delete, Create, List) for each role.

So you could make a vocabulary called Access Control, with two terms in it: Public and Private. You would make this a required field on the content types that you want protected. As you create each new content item, you would be forced to choose either Public or Private from the new vocabulary (you would need to visit all existing content and make a choice for each one, as this is not automatic).

You would then use the Taxonomy Access Permissions screen in User Management to deny all access to the Private items for the anonymous users and grant them View access for the Public items. If you're using the default admin user ID, you would still have full access to all content items.

Unauthorized users would not see Private items in the menus, nor in Search results, and search engine crawlers wouldn't see them because they are acting as anonymous users. The admin user would be able find the Private items in a site search.

This public/private use of the module really just scratches the surface of what's possible, because it can handle many access levels beyond seeing or not seeing a content item. You could create several user roles with increasing levels of access, like Authors who can Create and Update content items, and Editors who can Create, Update, and Delete items.

flamingLogos