Module Development

Entity Access Control for Drupal 8, 9, 10, and 11

One of Drupal's more powerful features is the fine-grained ability to control permissions and control access to content. The Entity API helps enable this functionality by providing an interface to help define access control.

In this tutorial we'll:

  • Look at how access control is handled, using Drupal core as an example.
  • Demonstrate how to implement access control in a custom module.
  • Learn about the hooks that allow developers to modify access control for entities provided by another module.

By the end of this tutorial you should have a better understanding of the entity access control system and how to work with it.