Summary
In this chapter, we talked about many access-related topics and techniques. In doing so, we covered what you need to know when starting Drupal module development. Of course, as you progress, you’ll dive deeper into the code and learn more subtle aspects and advanced concepts that you can employ in your modules. However, what we covered should set you well on your way. So, what exactly did we talk about?
We started by introducing the high-level Drupal access system, which is made up of the matrix between roles and permissions. In doing so, we not only saw how we can define permissions in code but also how we can check whether a user has those permissions. Of course, we looked at other ways we can check a user’s credentials and saw how we can use the AccountInterface
for this.
Then, we moved on to routes and saw all the various ways we can ensure access control on these. In doing so, we not only covered simple checks such as permissions and roles but also...