0

On my site there are 3 types of users:

  1. Public users who do not need to log in
  2. Public users who need to log in in order to access documents (pdfs, excel, etc)
  3. Users who maintain the web site (add, edit, delete content, etc)

I need to have a login form on my web site for the public users to log in to access what are otherwise "hidden" documents. These users will be public users so they will not have the ability to access anything related to the Drupal administration, such as adding content. I don't see how I can use Drupal's built-in Users system by adding a new role and modifying its permissions, especially since permissions are inherited from the authenticated user role.

What's the best way to go about this?

3 Answers 3

1

Drupal's administrative permissions are not necessarily linked to any specific role, and individual permissions can define access to anything from viewing individual content types to administrative functions like creating and editing--they aren't all tied to administrative features.

While it is true that all authenticated users will inherit permissions from Authenticated User, you can organize your permissions like so:

  • Anonymous User: (Permissions for users that don't need to log in.)
  • Authenticated User: (Remove all permissions except those needed to view documents)
  • Administrator (new role): (Permissions necessary to administer the site)

Then, give the Administrator role only to the accounts used to administer the site. Nothing says you have to give that role to every Authenticated User. Administrators will be able to view documents (as with any other authenticated user), though this sounds perfectly reasonable if I understand your use case.

Additional contributed modules allow for more fine-tuning over access control. For instance, the Field Permissions module may be useful if the files you're looking to distribute have been attached to nodes via File fields; this will allow you to determine access control at the field level if necessary.

0

I would use Drupal's default role and permission system for this. But Content Access Module might also be an option.

1
  • Thanks for your response. I should have been clearer. When I say public users need to log in to access documents, I mean to the front end of the web site. For example, you go to the home page, log in, then some document links display. I don't want to give public users access to the administrative side. Drupal's default role and permission system seems to be directly connected to the administrative side of Drupal.
    – aausa1983
    Commented Jan 30, 2012 at 15:53
0

Roles and Rules can help define access and you could try Login Destination.

0

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.