Node Access Grants
Categories
Component ID
2843981
Component name
Node Access Grants
Component type
module
Maintenance status
Development status
Component security advisory coverage
covered
Downloads
1120
Component created
Component changed
Component body
Why
The Drupal node access grants system has been more or less unchanged since the beginning. However, with Drupal 8, we can and should start leveraging the OOP and service oriented architecture for things like this.
This module defines a simple interface which needs to be implemented by a tagged service in order to play with access grant system, namely the hook_node_grants() and hook_node_access_records() implementations.
How to use it
If you want your module to have its own grants, make this module a dependency and instead of implementing the two hooks, create a service tagged node_access_grants and which implements the NodeAccessGrantsInterface.
