Users, roles, and permissions

In order to log in to your Drupal 8 site, you will need a user account.

A site maintenance account was created automatically when you installed Drupal, and the user can perform all actions on this site. You may hear this user referred to as user 1, which is a reference to the user ID in the database.

A user is another form of entity, and like all other entity types, this means that you can add fields to the user definition in order to include more information in the user account such as forename, surname, and telephone number.

Each user is assigned one or more roles, and roles have permissions attached to determine exactly what the user is permitted to do when logged into the site. Standard roles are:

  • Anonymous user: Assigned to anyone not logged into the site—visitors
  • Authenticated user: This is assigned to anyone logged in to the site
  • Administrator: This is for site owners, site maintainers, and site builders

You can, and most likely will, create additional roles for use on your site.

Drupal modules can add their own set of permissions. There is a permissions page where you can view and configure permissions for each role. You will find this page by navigating to Manage | People | Permissions.

The following example is an excerpt of the permissions page showing the custom permissions defined by the Comment module.

Users, roles, and permissions

Each role is assigned any number of these permissions, and then each user is assigned any number of roles. This design allows you to create a very fine-grained permission system in your Drupal site.

We will be covering roles and permissions in detail in Chapter 9, Users and Access Control.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset