This course will become read-only in the near future. Tell us at community.p2pu.org if that is a problem.

User Access Control


Objectives

  • Create a testing user (aside from the administrator user)
  • Create a role
  • Assign the test user a role
  • Configure permissions

Concepts

Drupal Users, Roles, and Permissions

You can allow people to access certain areas of your site, and restrict access to other areas, using access control. Visitors to your site can be registered (or register themselves) to obtain a username and password. Once a user is registered, xe may be assigned to various roles.  Each role has a set of permissions that provide fine grained control over which aspects of the site users in that role may access.

Creating users

To create a new user:

  1. Navigate to: Administer > People
  2. Click the "Add User" link to create a new user.
  3. Fill in the details for the user (username, email, password, groups, etc.)
  4. Click "Save"

Configuring User Registration

You can configure whether users can manually register on your site, along with registration criteria. To do so, visit:

Administer > Configuation > People > Account Settings

Primary Drupal roles

There are three primary types of users in Drupal 7 (standard installation).

  1. Anonymous - visitors who have not signed in to your site.
  2. Authenticated - users who have signed in with a username and password.
  3. Administrator - trusted users who have advanced permissions on your site.

Creating Roles

To create a new role:

  1. Navigate to: Administer > People > Permissions > Roles
  2. Find the table of existing roles
  3. Fill in the empty field, below the table, with a role name
  4. Click the "Add role" button

You can immediately edit the permissions for your new role by clicking the "edit permissions" button.

Managing Permissions

To manage permissions for all roles on your site:

  1. Navigate to: Administer > People > Permissions
  2. You will be presented a long table of permissions, with columns for each role.
  3. Click the check box in the column for each role/permission combination that you wish to grant

Task Discussion