1

What would be the best way to do this In a Drupal7 Website:
I want to add to an already existing Public Drupal Website an 'Internal Section' that can be viewed only by Login (Password Protected). This 'private/internal' Website will have 60+ info. pages, its own menu hierarchy, and any content that relates to it will also be private (private directory for images and files) Thank you.

Boutros.

1 Answer 1

3

Drupal has only a very course access control structure for viewing content. For the any user role, you can set permission to 'access content' (Drupal 6) or 'view published content' (Drupal 7), but that's about it.

Most inportant, out of the box, Drupal does not have any setting that let you set the permission "access content/view published content" for a particular content type. It is all or nothing. I.e. if you untick "access content/view published content" for the anonymous user, no content on your site will be available to those that are not logged in.

Assuming that you're looking for more fine-grained access control, (where only a section of your website is private) you need to install a node access control module. Many such modules exist. There is a page at the Drupal.org wiki giving an overview of node access modules. You may start by reading that and try to find a suitable module.

To make a recommendation, I'll say that the one named Content Access seems to match your requirements. It lets you control access per role and per content type. I use this module to create premium or private content for logged in users on my sites.

To use it, install and enable it. Create a new content type for the private pages - let's say you call it "Private page". Then (assuming Drupal 7) navigate to Administration » Structure » Content types and click "edit" for the "Private page". There is now a tab "Access control" that lets you control all types of access (Including "View") for this content type only.

As for menus, Drupal will usually manage this for you. Any menu items that leads to content that is inaccessible, will not be visible for the roles that are not allowed to see it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.